Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM install package without nested node_modules

I am running into the Windows Path character limit.

When I run an install of 'gulp' for example, via

npm install --save-dev gulp

in a folder such as "C:\Users\MyUsername\Visual Studio 2015\Projects\MyProject", I find that all the dependencies are deeply nested, such as:

C:\Users\MyUsername\Visual Studio 2015\Projects\MyProject\node_modules\gulp\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\loud-rejection\node_modules\signal-exit

Is there a way to avoid this? How do other Windows developers get past this?

like image 486
blgrnboy Avatar asked Jul 14 '26 18:07

blgrnboy


1 Answers

Are you using a NPM version 3.x. According to this Node npm windows file paths are too long to install packages most problems with nesting is solved in version 3.x

like image 92
HansP Avatar answered Jul 16 '26 09:07

HansP



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!