node-packer icon indicating copy to clipboard operation
node-packer copied to clipboard

Windows Max_Path limitation

Open intensite opened this issue 8 years ago • 3 comments

Hello,

I just encountered the dreaded windows 260-character path length limitation. while trying to compile a relatively simple application that uses the Knex.js database abstraction library.

I know this is not a node-compiler problem, but was wondering if you had any workaround.
I've made some research and it appears everyone is blaming each other with this issue (Node.js, NPM, Microsoft, etc..)

Best regards,

Stephen..

intensite avatar May 26 '17 14:05 intensite

I was able to work around most of the problem by flattening the node_modules directory using the instructions mentioned in this article https://scottaddie.com/2015/08/16/npm-vs-windows-max_path-limitation/

I am now having issues with native modules :-(

intensite avatar May 26 '17 15:05 intensite

@intensite I've just added support for native modules on the master branch and it will be released in nodec v1.0.0 next week.

Regarding the infamous Max. Path issue, my workaround has always been using the npm 4 or later, which generates much flattened node_modules structure. Good luck!

pmq20 avatar May 27 '17 02:05 pmq20

@intensite Also try putting the work directory at the root of your disk, so that the path prefix could be smaller. e.g. C:\x\...

pmq20 avatar Jun 02 '17 10:06 pmq20