mach bootstrap fails on windows with too long path for node module
Categories
(Firefox Build System :: Bootstrap Configuration, defect)
Tracking
(Not tracked)
People
(Reporter: Gankra, Unassigned)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
7.50 KB,
text/plain
|
Details |
Edit: See [this comment for instructions on how to workaround this issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1490802#c5). Was trying to run into to make sure I had node properly set up, but got this: WindowsError: [Error 206] The filename or extension is too long: '.\\node\\node_modules\\npm\\node_modules\\npm-profile\\node_modules\\make-fetch-happen\\node_modules\\https-proxy-agent\\node_modules\\agent-base\\node_modules\\es6-promisify\\node_modules\\es6-promise\\lib\\es6-promise\\promise' Windows 10, running mozillabuild in C:/gecko It got me far enough to get past configure, but I'm still running a clean build now to see if my build system is even coherent.
Reporter | ||
Comment 1•6 years ago
|
||
full log attached
Comment 2•6 years ago
|
||
In theory, npm the version of that we're shipping is supposed to have fixed this, so I'm not sure why we're hitting it: https://stackoverflow.com/questions/26155135/node-npm-windows-file-paths-are-too-long-to-install-packages I'm also not sure why more people haven't encountered this bug. I suspect we're going to end up using yarn rather than npm, so we may be able to workaround whatever the problem is just by removing npm from our repacks.
Comment 3•6 years ago
|
||
(In reply to Dan Mosedale (:dmose, :dmosedale) from comment #2) > I'm also not sure why more people haven't encountered this bug. I just ran into this issue, that I solved by moving the MOZBUILD_STATE_PATH folder to a different location.
Comment 4•6 years ago
|
||
Thanks for the workaround, Paolo! Having looked at one of the archives for the newest version of node 8, I suspect the version when we upgrade our version of node to 8.12.0, the version of npm included there will have much shorter paths.
Reporter | ||
Comment 5•5 years ago
•
|
||
Just writing this out so I can just copy-paste this anytime I run into it:
- make a dir with a very short path (I picked:
C:/a/
) MOZBUILD_STATE_PATH=C:/a/ ./mach bootstrap
now works!- Add
export MOZBUILD_STATE_PATH=C:/a/
to your mozconfig(s) ./mach build
now works! (if you skipped the previous step, you can always manually pass MOZBUILD_STATE_PATH to mach build)
Note: if you get errors with putting MOZBUILD_STATE_PATH in your mozconfig (some deps will randomly fail to be found), you may need to update MozillaBuild (follow the instructions exactly!) https://wiki.mozilla.org/MozillaBuild
Note: you still need to pass MOZBUILD_STATE_PATH to mach boostrap, as it doesn't read mozconfigs (aiui)
Can we get this bug added to mach busted
, so its easier to find/lookup?
Comment 6•5 years ago
|
||
I haven't been able to find any docs on how to nominate a bug for adding to mach busted
, but I bet :nalexander knows...
Comment 7•5 years ago
|
||
(In reply to Dan Mosedale (:dmose, :dmosedale) from comment #6)
I haven't been able to find any docs on how to nominate a bug for adding to
mach busted
, but I bet :nalexander knows...
Yep: you just add it to the dependency tree of https://bugzilla.mozilla.org/show_bug.cgi?id=mach-busted, which I have done.
Comment 8•5 years ago
|
||
My current suspicion is that once bug 1547823 gets fixed, that will also resolved this bug. Marking that bug as a dependency (though technically this bug could be fixed separately from that).
Comment 10•5 years ago
|
||
There's no reason we can't update the node version bootstrap installs without touching the base version we use to build on automation. We can even update the version used on automation, as long as we keep the base-toolchain jobs using the oldest version we support.
Comment 11•5 years ago
|
||
That's certainly true. I was just describing my suspicion of what situation was likely to get someone signing up to do the work soonest, based on my current knowledge of the players involved, which is unlikely to be comprehensive.
Comment 12•4 years ago
|
||
:Gankra, if our inference was correct, this bug should now be fixed. Can you try to reproduce in your environment and see?
Reporter | ||
Comment 13•4 years ago
|
||
Correct, this has been fixed! :hooray:
Description
•