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

Node.js 7.0.0 #1131

Closed
FeodorFitsner opened this issue Oct 25, 2016 · 9 comments
Closed

Node.js 7.0.0 #1131

FeodorFitsner opened this issue Oct 25, 2016 · 9 comments
Milestone

Comments

@FeodorFitsner
Copy link
Member

No description provided.

@remojansen
Copy link

I'm getting an error:

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> (C:\projects\inversifyjs\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)

You can see a build log at:

https://ci.appveyor.com/project/remojansen/inversifyjs/build/254/job/oq4wfttejd4yrjt8#L307

Looks like this is a known issue npm/npm#14438.

@XhmikosR
Copy link
Contributor

XhmikosR commented Nov 3, 2016

And how this is related to AppVeyor?

@remojansen
Copy link

remojansen commented Nov 3, 2016

The following is done by appveyor:

Build started
git config --global core.autocrlf true
git clone -q https://github.com/inversify/InversifyJS.git C:\projects\inversifyjs
git fetch -q origin +refs/pull/398/merge:
git checkout -qf FETCH_HEAD
Restoring build cache
Cache 'node_modules' - Restored
Running Install scripts
Install-Product node $env:nodejs_version
Uninstalling node 4.6.1 (x86)...
Installing node 7.0.0 (x86)...
npm install -g npm

I'm not sure about the right fix but here are some of the suggestions from the issue that I already linked:

Make sure to update npm to npm@4 when using Node v7.

I resolved the issue by deleting the /usr/local/lib/node_modules/npm folder and then reinstalled node 7.0.0 from the pkg installer.

Uninstalling node (v6.9.0), manually deleting node_modules and installing node v7.0.0 resolved it.

Maybe your node installation script is not working properly?

@XhmikosR
Copy link
Contributor

XhmikosR commented Nov 3, 2016

I still fail to see how this is an AppVeyor only issue. I mean, there shouldn't be any modules in %APPDATA%\npm.

As for manually deleting the local node_modules folder, that's something the user has to do. Or the AppVeyor cache should be more clever and check for the node version.

/CC @FeodorFitsner

@remojansen
Copy link

The build runs in a few versions of node:

environment:
  NODE_ENV: test

  matrix:
    - nodejs_version: "stable"
    - nodejs_version: "5.4.1"
    - nodejs_version: "5.4.0"
    - nodejs_version: "5.3.0"
    - nodejs_version: "5.2.0"
    - nodejs_version: "5.1.1"
    - nodejs_version: "4.4.6"

The build is working fine in all versions of node except nodejs_version: "stable"

I also found a second related issue with similar suggestions nodejs/node#9377

@XhmikosR
Copy link
Contributor

XhmikosR commented Nov 3, 2016

Just clear your node_modules manually. The cache should be more clever and depend on the node version like Travis CI is doing.

@remojansen
Copy link

Looks like I fixed by inversify/InversifyJS@6c8b874 but I really think this shouldn't be needed as a manual step.

Thanks a lot for helping me out 👍

@XhmikosR
Copy link
Contributor

XhmikosR commented Nov 3, 2016

Your so called fix is moot. You are basically disabling the cache. Unless you revert it later that is.

@XhmikosR
Copy link
Contributor

XhmikosR commented Nov 3, 2016

Have a look at https://github.com/appveyor/website/blob/master/appveyor.yml and especially

cache:
- 'node_modules -> appveyor.yml,npm-shrinkwrap.json,package.json'

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

3 participants