#Path, file name, or both are too long

14 messages · Page 1 of 1 (latest)

patent charm
#

When trying to build my app today, I got this error
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
As far as I can tell, none of the paths for my app directory are any longer than around 130 characters.

Please let me know any information you need.

narrow stirrup
#

try moving your project directory to a disk root (C:\ or D:\), this errors happens because some dependencies in node_modules can be deeply nested

patent charm
#

Still gives that error

patent charm
#

I also tried to change the tmpdir option to the disk root but that didn't fix it either

patent charm
#

Setting asar: true fixed it

rotund reef
#

are you packaging your node_modules?

patent charm
#

Yes I was

rotund reef
#

Maybe this was the real problem

patent charm
#

How do you not package that? And would that not cause problems with my app?

rotund reef
#

You should not have problem if you compile your JS files with webpack or something similar

#

and then package the compiled files only

#

You can use the ignore option to exclude stuff you don't want to package:

#
packagerConfig: {
    ignore: [
        "^\\/node_modules$",
        // [...]
    ]
},