io.js 2.2.x 2.3.x nodemon on Windows
C:\Users\Dev>nodemon
exception in nodemon killing node
Error: Cannot find module 'wrappy'
at Function.Module._resolveFilename (module.js:332:15)
at Function.Module._load (module.js:282:25)
at Module.require (module.js:361:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Users\Sergiy Kyrylkov\AppData\Roaming\npm\node_modules\nodemon\node_modules\update-notifier\node_modules\latest-version\node_modules\package-json\node_modules\got\node_modules\duplexify\node_modules\end-of-stream\node_modules\once\once.js:1:76)
at Module._compile (module.js:426:26)
at Object.Module._extensions..js (module.js:444:10)
at Module.load (module.js:351:32)
at Function.Module._load (module.js:306:12)
at Module.require (module.js:361:17)
at require (module.js:380:17)
Is it possible that the wrappy module is not there because of too long filenames ?
I am trying to reproduce but I cannot use npm with v2.2.0 because of a strange SSL error
@targos it worked fine before the upgrade. the project was on io.js since the beginning.
Probably caused by https://github.com/nodejs/io.js/issues/1850
@kyrylkov please retry with 2.2.1
It is not fixed in 2.2.1, I am getting the same error
@silverwind 2.2.1 doesn't solve the problem
@kyrylkov can you npm install nodemon -g again just to be sure that something that needs a rebuild gets rebuilt?
@kyrylkov was this actually working on a previous version? You're running really close to the path limit on that one and I wouldn't be surprised if that's involved, already the error is being caused at once.js which has a 230 char path and if wrappy is supposed to be a dependency then you'd likely be pushing the limit
@rvagg npm uninstall nodemon -g and npm install nodemon -g didn't help
@rvagg it worked all the way from io.js 1.0 or so. do you suggest to move the project folder closer to the root to try?
yeah, I'm wondering if something in npm has changed or perhaps a new version of nodemon or one of its dependencies has changed to alter the dependency tree to make it too deep; perhaps go to c:\ then npm install nodemon and then call it from where you need it as c:\node_modules\.bin\nodemon and see if you get different results
@rvagg If you referring to C:\Users\Dev\AppData\Roaming\npm\node_modules\nodemon\node_modules\update-notifier\node_modules\latest-version\node_modules\package-json\node_modules\got\node_modules\duplexify\node_modules\end-of-stream\node_modules\once\once.js, this is not something that a user can change, since on Windows this is a default installation path for global node modules.
@rvagg local installation from a very shallow path (C:\a\node_modules\.bin\nodemon) works
@rvagg however this doesn't solve a problem of a default io.js Windows installation, since the path for global node modules remains very long with no easy way to change it.
@kyrylkov this is going to have to be something to take up with the npm team over at https://github.com/npm/npm, we just bundle the tool here and it controls the installation of packages.
you should be able to npm config set prefix=c:\a\ to change the default though, I'm not sure how Windows will handle the executables though, you may need to add c:\a\bin or something to your PATH.
@rvagg got it. i'll open an issue at npm.
https://github.com/npm/npm/issues/8419
Are you sure that this is problem with NPM? iojs 2.2.0 can't find modules in long paths that are already installed. When I replace exe with iojs 2.1.0 (keeping latest npm), even "npm install" works correctly. iojs 2.2.0 and later breaks this (modules in long paths are not found). Returning to 2.1.0 fixes everything.
@neVERberleRfellerER you are right, it is an issue introduced in 2.2.0. See https://github.com/nodejs/io.js/issues/1990 and https://github.com/nodejs/io.js/pull/1991.