Way too long due to nested node dependencies

I use npm to install dependencies. After I installed them, I want to share my project with someone who is not technical and does not have npm, so I want to send node_modules inside the application.

However, since node defines dependencies, it creates a file with a very long path (217 characters)

node_modules\express\node_modules\connect\node_modules\multiparty\node_modules\readable-stream\node_modules\string_decoder\build\node_modules\cheerio\node_modules\htmlparser2\node_modules\domhandler\test\cases\04-unescaped_in_script.json

The problem (on Windows) is that when end users try to copy / paste a folder with file names that are too long, it gets the following error:

enter image description here

Is it possible, for example, to tell npm to install dependencies in a folder with a name nm , so the problem will most likely not appear.

+3
source share
2 answers

, :

+2

npm 3. (c:\GH), npm 3 . . , , npm node_modules.

:

+3

All Articles