SachinAgarwal's avatar

path too long error on windows 10

when I run the npm install on windows machine after setting up laravel I get the following error:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(308,5): error MSB3491: Could not write lines to file "R elease\obj\bufferutil\bufferutil.tlog\bufferutil.lastbuildstate". The specified path, file name, or both are too long. The fully qualifie d file name must be less than 260 characters, and the directory name must be less than 248 characters. [D:\xampp\htdocs\dummy2\node_modul es\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modul es\ws\node_modules\bufferutil\build\bufferutil.vcxproj]

Any idea how can i solve this? I searched a lot but couldn't find the solution.

0 likes
31 replies
rjsworking's avatar

I've had the same problem too and the solutions was on npm 3.

npm -g install npm@3.3.8

Luisa's avatar

Long Path tool can resolve error messages like: path too long, cannot delete file, too long path, destination path is too long, etc.

wehdemeyer's avatar

meanwhile ... there's no need for extra tools : as of Windows 10 Build 14352, NTFS long paths is available Win + R to launch the Run dialog box gpedit.msc and enable long paths Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem > NTFS since anniversary edition version 1607 it's directly under Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem

But: still not enabled for the Windows Explorer and maybe interfere with some older windows programs.

stepanraisa's avatar

“Long Path Tool” is very helpful for this error ! best solution for your problem.

aidencarter's avatar

Long path tool is the very good program for error, unlock solution. Try it and solve your problem. I used long path tool and I solve my error, unlock problem solution.

sergiymike's avatar

You can try Long Path Tool. is a software that will let you easily delete, copy or rename long path files.

aidencarter's avatar

The Long path tool is the very best program for error, unlock solution. Try it and solved your problem. I used the long path tool and I solved my error, unlocks problem solution.

howardbrooks's avatar

Long Path Tool is very helpful for this error. Try it and solved your problem.

frank1982's avatar

Long Path Tool is the best according to me because it is user friendly and you can do anything with it and I would definitely recommend it to you (5 out of 5 stars)

morgancooper's avatar

Has anyone tried Long Path Tool. Its the best option for all kind of problems. i have personally used it and it was awesome.

hansen51's avatar

You might want to try using long path tool

Corey_lean's avatar

This problem is not just with the npm but its a problem of windows, it does not allow operation on file with more than 255 characters. Use a dedicated and industry level software to deal with these problems and relax. I am currently using GS Richcopy 360 to solve this problem, it provides me multi threaded file transfer and email notification also when the transfer/backup is done.

fredsmith's avatar

You can also try to use Long Path Tool to resolve this issue.

DamienBrock's avatar

“Long Path Tool” is very helpful for this error! best solution for your problem.

RileyCooper's avatar

Still struggle with long paths. Tools like LongPathTool have helped me in similar situations.

jackyflint211's avatar

LongPathTool helped reduce deep paths so the Windows “Path Too Long” error stopped occurring.

Please or to participate in this conversation.