Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sails fails to run / install on Node 4.0.0 #3211

Closed
tjwebb opened this issue Sep 8, 2015 · 24 comments
Closed

Sails fails to run / install on Node 4.0.0 #3211

tjwebb opened this issue Sep 8, 2015 · 24 comments
Labels

Comments

@tjwebb
Copy link
Contributor

tjwebb commented Sep 8, 2015

tjwebb@latitude:/.../workspace/balderdashy/node4test $ node -v
v4.0.0-rc.5
tjwebb@latitude:/.../workspace/balderdashy/node4test $ sails generate new node4test
info: Created a new Sails app `node4test`!
tjwebb@latitude:/.../tjwebb/workspace/balderdashy $ cd node4test/
tjwebb@latitude:/.../workspace/balderdashy/node4test $ sails lift

info: Starting app...

Segmentation fault (core dumped)
tjwebb@latitude:/.../workspace/balderdashy/node4test $ 
@sgress454
Copy link
Member

Try sails lift --silly?

@sgress454
Copy link
Member

ah, ok. is there anything besides socket.io that still needs to be compiled?

@particlebanana
Copy link
Contributor

Looks similar to: socketio/socket.io#2213

@jldec
Copy link

jldec commented Sep 9, 2015

a temporary workaround would be to re-direct the dependency

"socket.io-client": "github:gsklee/socket.io-client#e50c1cc"

see socketio/socket.io#2213
another alternative is to prevent installs under node v4.0 while the dependencies catch up.

@ChALkeR
Copy link

ChALkeR commented Sep 12, 2015

Adding to the list: nodejs/node#2798.

@misterjt
Copy link

As i realise, i cant use sailsjs in nodejs v4.0.0 now?

@mikepaggi
Copy link

i'm getting the same start up error about Seg fault. Had to switch back to using node 0.12.7

@maxmaht
Copy link

maxmaht commented Sep 16, 2015

i've the same error, sails lift -silly give me :

info: Starting app...
verbose: Setting Node environment...
verbose: Please runnpm install coffee-scriptto use coffescript (skipping for now)
silly: Here's the require error(s): Error: Cannot find module 'coffee-script/register'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Hook.defaults (/usr/lib/node_modules/sails/lib/hooks/moduleloader/index.js:44:9)
at Hook.bound [as defaults] (/usr/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
at applyDefaults (/usr/lib/node_modules/sails/lib/app/private/loadHooks.js:70:22)
at Object.async.series.moduleloader (/usr/lib/node_modules/sails/lib/app/private/loadHooks.js:125:11)
at /usr/lib/node_modules/sails/node_modules/async/lib/async.js:620:25
at iterate (/usr/lib/node_modules/sails/node_modules/async/lib/async.js:146:13)
at Object.async.eachSeries (/usr/lib/node_modules/sails/node_modules/async/lib/async.js:162:9)
at Object.async.series (/usr/lib/node_modules/sails/node_modules/async/lib/async.js:619:19)
at initializeHooks (/usr/lib/node_modules/sails/lib/app/private/loadHooks.js:117:11)
at /usr/lib/node_modules/sails/lib/app/load.js:127:9
at /usr/lib/node_modules/sails/node_modules/async/lib/async.js:607:21
at /usr/lib/node_modules/sails/node_modules/async/lib/async.js:246:17 { [Error: Cannot find module 'coffee-script/register'] code: 'MODULE_NOT_FOUND' } Error: Cannot find module '/home/maxoux/rhproject/ll/node_modules/coffee-script/register'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Hook.defaults (/usr/lib/node_modules/sails/lib/hooks/moduleloader/index.js:48:11)
at Hook.bound [as defaults] (/usr/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
at applyDefaults (/usr/lib/node_modules/sails/lib/app/private/loadHooks.js:70:22)
at Object.async.series.moduleloader (/usr/lib/node_modules/sails/lib/app/private/loadHooks.js:125:11)
at /usr/lib/node_modules/sails/node_modules/async/lib/async.js:620:25
at iterate (/usr/lib/node_modules/sails/node_modules/async/lib/async.js:146:13)
at Object.async.eachSeries (/usr/lib/node_modules/sails/node_modules/async/lib/async.js:162:9)
at Object.async.series (/usr/lib/node_modules/sails/node_modules/async/lib/async.js:619:19)
at initializeHooks (/usr/lib/node_modules/sails/lib/app/private/loadHooks.js:117:11)
at /usr/lib/node_modules/sails/lib/app/load.js:127:9
at /usr/lib/node_modules/sails/node_modules/async/lib/async.js:607:21
at /usr/lib/node_modules/sails/node_modules/async/lib/async.js:246:17 { [Error: Cannot find module '/home/maxoux/rhproject/ll/node_modules/coffee-script/register'] code: 'MODULE_NOT_FOUND' }
verbose: moduleloader hook loaded successfully.
verbose: Loading app config...
verbose: userconfig hook loaded successfully.
verbose: Exposing global variables... (you can disable this by modifying the properties insails.config.globals)
verbose: Loading user hooks...
verbose: userhooks hook loaded successfully.
Erreur de segmentation

@alyrik
Copy link

alyrik commented Sep 17, 2015

Updating sails package globally and locally resolved this problem for me.

@sgress454 sgress454 changed the title immediate segfault on node 4.0.0-rc5 Sails fails to run / install on Node 4.0.0 Sep 18, 2015
@jldec
Copy link

jldec commented Sep 21, 2015

Latest socket.io (v1.3.7) installs with node v4.0.

@camsjams
Copy link

@jldec Thanks for the info - I just tried on a fresh install of Sails and manually bumped the socket.io version in sails-hook-sockets and it looks to be much improved! I will try more with an existing project, but this looks promising!

@DiegoZoracKy
Copy link

My experiences solving this problem:

OSX: 10.9.4
Updating sails global and local, but, only on Node v4.1.0

Ubuntu: 14.04
Updating sails global and local, but, only on Node v4.1.0

Windows 7:
Worked since v4.0.0

@mikermcneil
Copy link
Member

@rauchg just published socket.io 1.3.7

see socketio/socket.io#2245 (comment) and socketio/socket.io#2254

If y'all wouldn't mind giving that a test, we can bump the sio dep in sails-hook-sockets and publish a patch to NPM asap.

@DiegoZoracKy
Copy link

In my case updating socket.io to 1.3.7 wasn't enough to Node v4.0. As i said in my previous comment, just when i updated my node version to 4.1 things started to work again. (osx and ubuntu)

@camsjams
Copy link

Hmm @DiegoZoracKy when I got home and tried on another project, your comment holds true.

For me, on a fresh install of Sails.js with Node 4.0.0 it appeared to work (though there was just one API controller).

On a realistic install of Sails.js with more dependencies and setup, I had to switch to Node 4.1.0 as mentioned above.

But I can confirm that with Node.js 4.1.0 that this bug is gone for me!

Thanks all!

@mikermcneil
Copy link
Member

@vielmetti
Copy link

Please note that Node.js 4.1.0 has a security issue at

nodejs/node#2931

which will make you want to depend on >=4.1.1 once it appears.

@camsjams
Copy link

@vielmetti noted - thanks!

@mikermcneil
Copy link
Member

@vielmetti thanks!

@sgress454
Copy link
Member

Patched and published Sails v0.11.2. Thanks all!

@PaulBaugher
Copy link

Same issue / fresh install node stable (5.0)

@sgress454
Copy link
Member

@digitalskyline I was able to install Sails on Node 5 without error. Make sure you clear your npm cache first (npm cache clear), and if you still experience problems, please open a new issue (this one is about Node 4) with details about your system including NPM version.

@randallmeeker
Copy link

also remove your node_modules directory for good measure.

kevinburkeshyp pushed a commit to Shyp/sails that referenced this issue Mar 21, 2016
Per balderdashy#3211, this version of microtime
doesn't work with Node 4, and is trivially replaceable with `process.hrtime`
from the standard library.

Patch mostly applied from commit b0b94c9 in
the upstream repository. You probably want to view this diff with whitespace
changes disabled, the actual diff is very short.
kevinburkeshyp pushed a commit to Shyp/sails that referenced this issue Mar 21, 2016
Per balderdashy#3211, this version of microtime
doesn't work with Node 4, and is trivially replaceable with `process.hrtime`
from the standard library.

Patch mostly applied from commit b0b94c9 in
the upstream repository. You probably want to view this diff with whitespace
changes disabled, the actual diff is very short.
@cScarlson
Copy link

I was dead in the H2O -- ready to move my beta from prototype/sails to beta/strapi. Here's what I did instead (because I like Sails more)...
npm uninstall -g sails
[nodejs get latest (4.4.n)]
npm i -g sails
That worked :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests