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
Dependencies in bundledDependencies cause Windows too long path error. #2146
Comments
I have some additional information that I hope will help, and may have a proposal for a simple fix. I have project and have the following dependencies in my package.json: The root of my source code is: If I look at the paths under node_module, the longest path I get is: which is 235 characters. My colleague at work stores his source at: which pushes it over the limit. As a test, if I delete the node_modules\bower tree on my computer, then the next longest line becomes: C:\s\Server\node_modules\gulp-typescript\node_modules\glob-stream\node_modules\readable-stream\lib_stream_passthrough.js which is only 121 characters. We're using "npm 3", which uses flat dependencies, rather than nesting node_modules folders within node_modules folders. I was surprised to see bower nave node_modules nested the 'npm 2' way. I suspect the reason is because of bundleDependencies If you look at the package.json file in bower, it has:
which means the version of bower that we're using, the current version as of now, "1.7.2", is using npm 2 somewhere in the build pipe. And, by definition, the packager bundles the node_modules as is. When we do an 'npm install' on our system with npm 3, it's rare to see node_modules nested. It does happen sometimes, when there's modules refer to different versions of a common module, but the paths never get that long. As you can see, in the extreme case, such as with typescript, the longest length is 121 characters. When I do this in the node_modules folder:
I notice that bower is the only component that uses this feature. My suggestion is to upgrade to npm 3 or to no use bundleDependencies. I used the following windows script to determine the longest line: |
This prevents deployment of apps using bower on Azure :( Agree that using bundleDependencies when the paths are that deep is probably wrong. |
I have node 3.5.3, so the problem is in bundleDependencies. |
I think he meant to bundle dependencies with npm v3.0 so that the resulting structure was flat. That would probably require npm 3.0 for users though... |
@AdamPflug I made preview of bower bundled this way. Could you test it?
|
It should be fixed in bower 1.7.5 |
Hi rmaziarka, I have tried "Long Path Tool" to solve the issue. You may try too. Regards |
you must give a try to "Long Path Tool Program" it will fix this issue |
You also may try https://github.com/sheerun/npm-packer |
Hi guys,
We have the same error like @Herby had here: #1948
Packing all dependencies in bundleDependencies in package.json creates path that exceeds maximum path length in Windows system:
273 letters. This is working properly in version 1.6.6, before 1.6.7 - Bundless all the dependencies again https://github.com/bower/bower/blob/master/CHANGELOG.md happened.
The text was updated successfully, but these errors were encountered: