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

sequelize-cli non-functional @node7.0.0 #383

Closed
awitherspoon opened this issue Oct 31, 2016 · 9 comments
Closed

sequelize-cli non-functional @node7.0.0 #383

awitherspoon opened this issue Oct 31, 2016 · 9 comments

Comments

@awitherspoon
Copy link

Using sequelize with the latest version of node throws the following error:

Sequelize [Node: 7.0.0, CLI: 2.4.0, ORM: 3.24.6]

module.js:474
    throw err;
    ^

Error: Cannot find module 'internal/fs'
    at Function.Module._resolveFilename (module.js:472:15)
    at Function.Module._load (module.js:420:25)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at evalmachine.<anonymous>:17:20
    at Object.<anonymous> (/usr/local/lib/node_modules/sequelize-cli/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:11:1)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)

This seems to be related to a bad version of graceful-fs, as noted in this npm issue

Needless to say, the expected behavior was that updating the package would allow for it to work inside node7.0.0. It seems that the graceful-fs package being used by sequelize-cli needs to be updated.

@kojuka
Copy link

kojuka commented Nov 2, 2016

getting this too.

@awitherspoon
Copy link
Author

It looks like this is tied to the version of Gulp being used, and Gulp 4.0 seems suited based on version number of the package vinyl-fs. That being said, it's also not a fully released build yet, and so would certainly require testing to ensure it will work as expected in sequelize-cli.

@Americas
Copy link
Collaborator

Americas commented Nov 4, 2016

npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

And the 'npm ls graceful-fs' result is:

sequelize-cli@2.4.0
├─┬ fs-extra@1.0.0
│ └── graceful-fs@4.1.10 
├─┬ gulp@3.9.1
│ └─┬ vinyl-fs@0.3.14
│   ├─┬ glob-watcher@0.0.6
│   │ └─┬ gaze@0.5.2
│   │   └─┬ globule@0.1.0
│   │     └─┬ glob@3.1.21
│   │       └── graceful-fs@1.2.3 
│   └── graceful-fs@3.0.11 
└─┬ sqlite3@3.1.8
  └─┬ node-pre-gyp@0.6.31
    ├─┬ tar@2.2.1
    │ └─┬ fstream@1.0.10
    │   └── graceful-fs@4.1.9 
    └─┬ tar-pack@3.3.0
      └─┬ fstream@1.0.10
        └── graceful-fs@4.1.9 

Gulp is using graceful-fs < v4. It needs to update before this can be used in node v7..

@noderat
Copy link

noderat commented Nov 28, 2016

Looks like another reason for #344

@Zaggen
Copy link

Zaggen commented Mar 14, 2017

I'm having pretty much the same issue with node 7.7.1 on windows 10, except that i'm not getting any errors, but the cli does not execute any command, not even help. It only shows

Sequelize [Node: 7.7.1, CLI: 2.4.0, ORM: 3.30.2, mysql: ^2.13.0]

Switching to node 6.7.0 via nvm makes it functional again.

I've just test it on ubuntu 16.04 with the same version of node and it seems to be working

@idris
Copy link

idris commented Jun 8, 2017

Has anyone found a workaround for this other than switching to node 6.7.0 via nvm?

@idris
Copy link

idris commented Jun 15, 2017

I can confirm this is an issue in Node 8 as well. @janmeier do you have any thoughts on how we can fix this? Node 8 is going into LTS soon so this will become a bigger problem.

It looks like maybe a Gulp upgrade would fix it? nodejs/node#9355 (comment)

@delveintechnolabs
Copy link

Same issue in Node 8 as well

@sushantdhiman sushantdhiman mentioned this issue Sep 1, 2017
@sushantdhiman
Copy link
Contributor

CLI doesn't depend on Gulp any more, so this should be fixed now

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

No branches or pull requests

8 participants