Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

"npm test" after a successful "npm install" fails with node v7.0.0 from nvm on Mageia Linux x86-64 v6 #1050

Closed
shlomif opened this issue Oct 29, 2016 · 14 comments

Comments

@shlomif
Copy link
Contributor

shlomif commented Oct 29, 2016

Hi all.

"npm test" after a successful "npm install" fails with node v7.0.0 from nvm on Mageia Linux x86-64 v6. I am getting this output:

shlomif@telaviv1:~/Download/unpack/firefox/debugger.html$ npm test

> debugger.html@0.0.6 test /home/shlomif/Download/unpack/firefox/debugger.html
> node public/js/test/node-unit-tests.js

module.js:474
    throw err;
    ^

Error: Cannot find module '../../devtools-local-toolbox/public/js/test/test-flag'
    at Function.Module._resolveFilename (module.js:472:15)
    at Function.Module._load (module.js:420:25)
    at Function.Module._load (/home/shlomif/Download/unpack/firefox/debugger.html/node_modules/mock-require/index.js:14:22)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/shlomif/Download/unpack/firefox/debugger.html/node_modules/devtools-config/src/feature.js:6:14)
    at Module._compile (module.js:573:32)
    at Module.module.constructor._compile (/home/shlomif/Download/unpack/firefox/debugger.html/node_modules/amd-loader/amd-loader.js:10:31)
    at Module._extensions..js (module.js:582:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/shlomif/Download/unpack/firefox/debugger.html/node_modules/babel-register/lib/node.js:152:7)
npm ERR! Test failed.  See above for more details.
shlomif@telaviv1:~/Download/unpack/firefox/debugger.html$

Please let me know how I can further help.

@jasonLaster
Copy link
Contributor

Thanks. Nice find! Also kudos for using 7

Looks like the devtools-config/feature module can't find the feature-flag module.

Feel free to play with path.x methods

Also install node 6 with nvm

@shlomif
Copy link
Contributor Author

shlomif commented Oct 29, 2016

@jasonLaster : OK, thanks for the update - I'm going to try with v6.9.1.

@shlomif
Copy link
Contributor Author

shlomif commented Oct 29, 2016

Just a small update that I'm getting a very similar problem with node v6.9.1:

shlomif@telaviv1:~/Download/unpack/firefox/debugger.html$ npm test

> debugger.html@0.0.6 test /home/shlomif/Download/unpack/firefox/debugger.html
> node public/js/test/node-unit-tests.js

module.js:471
    throw err;
    ^

Error: Cannot find module '../../devtools-local-toolbox/public/js/test/test-flag'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Function.Module._load (/home/shlomif/Download/unpack/firefox/debugger.html/node_modules/mock-require/index.js:14:22)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/shlomif/Download/unpack/firefox/debugger.html/node_modules/devtools-config/src/feature.js:6:14)
    at Module._compile (module.js:570:32)
    at Module.module.constructor._compile (/home/shlomif/Download/unpack/firefox/debugger.html/node_modules/amd-loader/amd-loader.js:10:31)
    at Module._extensions..js (module.js:579:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/shlomif/Download/unpack/firefox/debugger.html/node_modules/babel-register/lib/node.js:152:7)
npm ERR! Test failed.  See above for more details.
shlomif@telaviv1:~/Download/unpack/firefox/debugger.html$ node --version
v6.9.1
shlomif@telaviv1:~/Download/unpack/firefox/debugger.html$

I have not played with the path.x methods yet (whatever those are).

@jasonLaster
Copy link
Contributor

Hmm. Interesting, it works for me on 6.9. Was thinking of path.resolve. Happy to pair on Monday if your free

@shlomif
Copy link
Contributor Author

shlomif commented Oct 29, 2016

@jasonLaster : I see. I can try it on a VirtualBox VM as well. What do you mean by "pair"? Do you mean "pair program"?

@jasonLaster
Copy link
Contributor

Yea. I can do a google hangout Monday if you're free. My email is
Jason.laster.11@gmail.com
On Sat, Oct 29, 2016 at 5:09 PM Shlomi Fish notifications@github.com
wrote:

@jasonLaster https://github.com/jasonLaster : I see. I can try it on a
VirtualBox VM as well. What do you mean by "pair"? Do you mean "pair
program"?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1050 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPiYl8qXL1Mm-ZGxW2yQdALxXFjCUUwks5q47YMgaJpZM4KkLpc
.

@shlomif
Copy link
Contributor Author

shlomif commented Oct 29, 2016

@jasonLaster : OK, I might do it.

@shlomif
Copy link
Contributor Author

shlomif commented Oct 30, 2016

Hi!

sorry for the late report, but I am getting a very similar report on a relatively up-to-date Debian Sid/Unstable VBox VM with nvm's node v6.9.1 after doing only "npm install" and "npm test". See:


> debugger.html@0.0.6 test /home/shlomif/Downloads/debugger.html
> node public/js/test/node-unit-tests.js

module.js:471
    throw err;
    ^

Error: Cannot find module '../../devtools-local-toolbox/public/js/test/test-flag'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Function.Module._load (/home/shlomif/Downloads/debugger.html/node_modules/mock-require/index.js:14:22)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/shlomif/Downloads/debugger.html/node_modules/devtools-config/src/feature.js:6:14)
    at Module._compile (module.js:570:32)
    at Module.module.constructor._compile (/home/shlomif/Downloads/debugger.html/node_modules/amd-loader/amd-loader.js:10:31)
    at Module._extensions..js (module.js:579:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/shlomif/Downloads/debugger.html/node_modules/babel-register/lib/node.js:152:7)
npm ERR! Test failed.  See above for more details.

@jasonLaster
Copy link
Contributor

@shlomif mind doing a fresh git clone, yarn install? I'd like to see if this works for you.

@shlomif
Copy link
Contributor Author

shlomif commented Nov 16, 2016

@jasonLaster : hi! I am getting this:

shlomif@telaviv1:~/Download/unpack/firefox/fresh-deb-html/debugger.html$ ./node_modules/.bin/yarn install
yarn install v0.17.2
$ ./bin/preinstall
├── lerna@2.0.0-beta.30 extraneous (git://github.com/jasonlaster/lerna.git#f59454363fde40769b97291d4fb2f1eece4e2e9a)
Lerna v2.0.0-beta.30
Bootstrapping 7 packages
Installing external dependencies
Symlinking packages and binaries
Prepublishing packages
Successfully bootstrapped 7 packages.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.0.14: The platform "linux" is incompatible with this module.
info "fsevents@1.0.14" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/home/shlomif/.cache/yarn/npm-workerjs-0.1.1-6c53f106c5664d4691c241ab2f43c5afe4d74fa8'".
info If you think this is a bug, please open a bug report with the information provided in "/home/shlomif/Download/unpack/firefox/fresh-deb-html/debugger.html/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
shlomif@telaviv1:~/Download/unpack/firefox/fresh-deb-html/debugger.html$

here is the yarn-error.log:

yarn-error.log.txt

this is with /usr/bin/node being v6.9.1 on Mageia v6 x86-64.

@jasonLaster
Copy link
Contributor

Thanks @shlomif we have an issue for that #1216.

Out of curiosity, did npm start still work?

@shlomif
Copy link
Contributor Author

shlomif commented Nov 16, 2016

@jasonLaster : npm start still works but npm i was very noisy with many WARNings .

@jasonLaster
Copy link
Contributor

Thanks @shlomif

@jasonLaster
Copy link
Contributor

@juliandescottes helped me hunt this down! This issue:

Error: Cannot find module '../../devtools-local-toolbox/public/js/test/test-flag'

is caused by the debugger's node_modules not properly linking the packages like devtools-config. This can be fixed by nuking the node_modules and re-running npm or yarn install.

rm -rf node_modules packages/*/node_modules

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

No branches or pull requests

2 participants