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:

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.
source
share