-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long path support issues on windows when using npm3 #970
Comments
Guess I am the only windows user of cra 😄 |
I don’t think so. I haven’t had time to reply because I’m focusing on React itself this quarter and so this repo is less actively maintained. It’s not clear to me why this happens. Do you have any idea? I thought npm3 is supposed to try flat structure when possible. |
I have tried using yarn and it does exactly the same react-scripts ends up with multiple nested node_modules folders causing the long path name issues. |
NPM do try flat structure if possible, so I think it is because of bundledDependencies. Also, actually it is only nested 3 levels of node_modules, as the longest path (258 characters) is:
seems because UPDATE: One thing I noted that in my system, |
@dvkndn I am pretty new to node and how the packaging system works, how do you control the bundledDependencies as a package author? I referenced the phantomjs case but its not clear how they solved the issue. might have to do more reading. |
We control bundledDependencies. We added them to cut the install time on npm 2. However now that Node 6 is the LTS release (and comes with npm 3) it may be a good time to drop support for npm 2 and remove bundledDependencies. |
Yes remove bundledDependencies also help solve several bugs relating when forking CRA. |
Tagging this as 0.8.0 since that's the release where we should remove |
Bundled dependencies were removed in #1068 so this should be fixed in the upcoming release. |
Description
TL;DR when using npm3 node packages should not include their dependencies. ie shouldn't have a sub node_modules folder. on windows this can cause long path names. longer than what windows can support.
npm guidance https://docs.npmjs.com/how-npm-works/npm3
Long story but we use cake build scripts and it doesn't support long files paths on windows. We have had a similar issue recently when phantomjs broken release.
Environment
npm ls react-scripts
(if you haven’t ejected): [email protected]node -v
: v4.4.5 / v6.9.1npm -v
: v3.7.1 / v3.10.8Then, specify:
node_modules structure after npm install
The text was updated successfully, but these errors were encountered: