Downloading online NPM resources works fine while installation and service is installed successfully.
But when we pack Node_modules folder with installer... It throws folder path too long error while copying and unzipping offline downloaded node_modules files. Now Issue comes when client machine does not have internet and we wish to package it with installer.
How will we do it.
File Path too long / Folder path too long
Another way you can get around this is to just install it firstly to the shortest path you can get away with :) This means not accepting the default package path when extracting i.e.
But for example:
This worked for me when I came across the same issue.
You can disable the 260-character
MAX_PATH
limit in Windows 10.MSDN
You may also achieve a reduced folder depth using
npm dedupe
.This is common error which comes while copying node_modules folder within Window machine because of some large number of sub-directories and long file/folder names.
In latest version of NPM, all dependent node_modules are installed at root folder and hence nested folders shouldn't be issue. Can you try upgrading npm to latest version
Thanks (courtesy: Himanshu Jain)