Issue trying to deploy KeystoneJS using Digital Ocean - unicode
I'm getting the below error when I try to deploy my Keystonejs website. It works when I run it locally. However using digital ocean on: 512 MB Memory / 20 GB Disk / LON1 - Ubuntu node v4.4.0 on 14.04 it gives ...
node keystone.js
{ [Error: ENOENT: no such file or directory, open '.env'] errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }
module.js:327
throw err;
^
Error: Cannot find module 'unicode/category/So'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at symbols (/root/vanillakeystone/node_modules/keystone/node_modules/keystone-utils/node_modules/slug/slug.js:6:16)
at /root/vanillakeystone/node_modules/keystone/node_modules/keystone-utils/node_modules/slug/slug.js:199:5
at Object. (/root/vanillakeystone/node_modules/keystone/node_modules/keystone-utils/node_modules/slug/slug.js:212:2)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
Please help! Thanks in advance.
I too get it some time.
Whenever I get I run this command.
node node_modules/unicode/install.js
Manually go into your node_modules folder and delete the unicode module. Then, go back to your project directory where you're running node keystone.js and type npm install unicode.
Then run your node keystone.js command again.
What I normally do is create a Docker image with my Keystone project, so that I don't have that kind of compatibility issues:
https://v5.keystonejs.com/guides/deployment
Related
Unable to start VSC
I recently tried to start VSC but nothing came up I waited around 15 min but still nothing happend so I tried to run it with CMD and then I found that I got some invalid token (I don't have Node.js) here this is what happend when I tried to run it this is what the log gave out: Y:\Microsoft VS Code\resources\app\out\vs\loader.js:1 .58a4.6,4.6,0,0,1-2.11-.46v-1a4.33,4.33,0,0,0,2.09.61q2.4,0,2.4-2.55v-.71h0a2.63,2.63,0,0,1-4.19.38,3.46,3.46,0,0,1-.74-2.33,4,4,0,0,1,.8-2.63,2.66,2.66,0,0,1,2.18-1,2.12,2.12,0,0,1,1.95,1.05h0v-.9h1Zm-1-2.42v-1a1.86,1.86,0,0,0-.52-1.33,1.73,1.73,0,0,0-1.3-.55,1.81,1.81,0,0,0-1.51.7,3.13,3.13,0,0,0-.55,2,2.69,2.69,0,0,0,.52,1.74,1.69,1.69,0,0,0,1.39.65,1.81,1.81,0,0,0,1.43-.62A2.32,2.32,0,0,0,104.93,95.39Z"/><path class="cls-3" d="M113.3,95.34h-4.59a2.43,2.43,0,0,0,.58,1.68,2,2,0,0,0,1.54.59,3.19,3.19,0,0,0,2-.72v1a3.77,3.77,0,0,1-2.27.62,2.75,2.75,0,0,1-2.17-.89,3.63,3.63,0,0,1-.79-2.49,3.55,3.55,0,0,1,.86-2.47,2.76,2.76,0,0,1,2.14-1,2.44,2.44,0,0,1,2,.83,3.44,3.44,0,0,1,.7,2.29Zm-1.07-.88a2.12,2.12,0,0,0-.44-1.4,1.48,1.48,0,0,0-1.19-.5,1.68,1.68,0,0,0-1.25.53,2.4,2.4,0,0,0-.63,1.38Z"/><path class="cls-3" d="M127.86,98.33h-1.06V92.22q0-.72.09-1.77h0a5.69,5.69,0,0,1-.27.88l-3.11,7H123l-3.1-6.94a5.42,5.42,0,0,1-.27-.93h0q0,.54.05,1.78v6.09h-1v-9.1H120l2.7 SyntaxError: Invalid or unexpected token at Module._compile (internal/modules/cjs/loader.js:942:18) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1051:10) at Module.load (internal/modules/cjs/loader.js:862:32) at Module._load (internal/modules/cjs/loader.js:774:14) at Function.Module._load (electron/js2c/asar.js:769:28) at Module.require (internal/modules/cjs/loader.js:899:19) at require (internal/modules/cjs/helpers.js:74:18) at Object.<anonymous> (Y:\Microsoft VS Code\resources\app\out\bootstrap-amd.js:5:27) at Module._compile (internal/modules/cjs/loader.js:1014:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1051:10) at Module.load (internal/modules/cjs/loader.js:862:32) at Module._load (internal/modules/cjs/loader.js:774:14) at Function.Module._load (electron/js2c/asar.js:769:28) at Module.require (internal/modules/cjs/loader.js:899:19) at require (internal/modules/cjs/helpers.js:74:18) at startup (Y:\Microsoft VS Code\resources\app\out\main.js:8:176) at onReady (Y:\Microsoft VS Code\resources\app\out\main.js:8:422) But anyway I already tried to run it with some diffrent options like: compatibility settings, running as admin and checked if I got Nods.js if that caused the troubles Thanks in advance ^=^
Hi, Did you install nodejs in your system. VS Code requires nodejs since it is built with electron. If you have node but this error still occurs try reinstalling VS Code.
seems like after reinstalling it (and converted it to portable) it works now I don't know if it was because of an plugin or not but what I know it works now I still don't know the awnser but it seems like reinstalling done the trick :/
Hyperledger Fabric Fabcar node enrollAdmin.js
I'm trying to run fabcar sample. But at the step of run a command which is node enrollAdmin.js an error occurs like below; /home/<username>/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:742 async _createOrUpdateChannel(request, have_envelope) { ^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Unexpected identifier at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:549:28) at Object.Module._extensions..js (module.js:586:10) at Module.load (module.js:494:32) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.require (module.js:504:17) at require (internal/module.js:20:19) at Object.<anonymous> (/home/<username>/fabric-samples/fabcar/node_modules/fabric-client/index.js:25:18) I have checked the file which is error occurred. I find line 742 but I couldn't see syntax error.
Had the same error, it works after i updated to Node v8.9.4. npm rebuild and run
It is stated in the Hyperleder fabric Pre-Requisites that the only node version 8.9.X is supported. https://hyperledger-fabric.readthedocs.io/en/release-1.2/prereqs.html Would advise you to upgrade the node version. Use this link to upgrade the node version: Upgrading Node.js to latest version
MongoDB on Ubuntu weird error ^?ELF^B^A^A
I was running MongoDB successfully on an Ubuntu server along with my nodeJS application. But for some reason I get following error in my mongodb-log when I start it with forever start /path/to/mongod: /mongodb/mongodb-linux-x86_64-3.0.5/bin/mongod:1 (function (exports, require, module, __filename, __dirname) { ^?ELF^B^A^A^ SyntaxError: Unexpected token ILLEGAL at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 error: Forever detected script exited with code: 8 I removed the mongodb directory and installed it again, but I still get the same error. Thanks for your help
forever is only meant to node.js-based modules. mongod is a binary (i.e. in ELF format, do file $(which mongod) to verify this for yourself) and cannot be handled by forever. What you see is forever trying to use node to start a node module called mongoand failing to compile the js code (since it is reading a ELF header). You will have to rely on your system's init system as for regular daemons. I would start reading here for how to proceed.
New to Derby starter app crashing
I am new to Derby and just installed it on Ubuntu 12.10. I have the following installed. node v0.11.6-pre Derby 0.5.9 Mongo git master Redis 2.2.12 I created the starter CoffeeScript application using derby new --coffee testapp. It seems like things installed just fine. When I try to run the app using npm start I get the following error: digilord#digidev:~/testapp$ npm start > testapp#0.0.0 start /home/digilord/testapp > ./node_modules/coffee-script/bin/coffee server.coffee Master pid 12985 /home/digilord/testapp/node_modules/coffee-script/lib/coffee-script/optparse.js:51 throw new Error("unrecognized option: " + arg); ^ Error: unrecognized option: --debug-port=5859 at OptionParser.exports.OptionParser.OptionParser.parse (/home/digilord/testapp/node_modules/coffee-script/lib/coffee-script/optparse.js:51:19) at parseOptions (/home/digilord/testapp/node_modules/coffee-script/lib/coffee-script/command.js:464:29) at Object.exports.run (/home/digilord/testapp/node_modules/coffee-script/lib/coffee-script/command.js:55:5) at Object.<anonymous> (/home/digilord/testapp/node_modules/coffee-script/bin/coffee:7:41) at Module._compile (module.js:450:26) at Object.Module._extensions..js (module.js:468:10) at Module.load (module.js:350:32) at Function.Module._load (module.js:306:12) at Function.Module.runMain (module.js:491:10) at startup (node.js:119:16) at node.js:813:3 digilord#digidev:~/testapp$ Has anyone else run into this?
With some help from TheOceanMethod I was able to get everything working. Thought I was going to stop there huh? Here's the solution: Derby 0.5.9 Node v0.10.15 Mongo git master Redis 2.6.14 Derby 0.5.9 requires Node to be v0.10.15. Not Derby specifically. Some of the dependancies require that version of Node. Redis needs to be v2.6+, so 2.6.14 works. One other thing. In the server/index file there is a line that references ../../public that is commented out. In order to get the ability to serve images you need to uncomment that line.
can not run meteor bundle in node on CENTOS
I have a meteor app that works fine on my computer under OSX but when I copy it to my CENTOS 6 server it gives me following error: node main.js server/server.js:95 Fiber(function () { ^ ReferenceError: Fiber is not defined at run (/root/bundle/server/server.js:95:3) at Object.<anonymous> (/root/bundle/server/server.js:156:1) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at Object.<anonymous> (/root/bundle/main.js:1:63) at Module._compile (module.js:449:26) I did install the fibers package with npm install fibers I also changed the port number in server.js to be 8282 instead of 80 in order to avoid any conflicts. thank you for your help
it turns out you have to install fibers inside the meteor project and not as a global package