You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
created project folder tree too deep for windows #1298
OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 7
Versions. Please run ng --version. If there's nothing outputted, please
run in a Terminal:
node --version
And paste the result here.
angular-cli: 0.1.0
node: 5.4.0
os: win32 x64
Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
Issue is almost the same as it was in #1090, but I'm using node 5, instead of node 3, so the solution provided in that issue does not help. Also you need to have a base path of about 50 characters for the problem to occur.
Go to directory: C:\myproject\myproject\subproject\src\main\resources\web
Create project: ng new --skip-git myproject
Try to delete it and see how it fails
Here is one of the problematic paths:
C:\MYPROJ1\MYPROJ1\SUBPRO1\src\main\web\NODE_M1\ANGULA1\NODE_M1\EMBER-1\NODE_M1\BROCCO1\NODE_M1\BABEL-1\NODE_M1\REGENE1\NODE_M1\defs\NODE_M1\yargs\NODE_M1\cliui\NODE_M1\CENTER1\NODE_M~1\ALIGN-1\NODE_M1\kind-of\node_modules\is-buffer
Problems seem to occur only under node_modules\angular-cli.
angular-cli paths are about 200 characters, so your base path needs to be about 50 characters for you to see the problem. If you create the project directly to the C-root, you won't see the problem.
While the path in this example if invented just for this purpose, this problem happened in real life project (I admit that the project could be structured better, but this is just what real life provides).
If you can't do anything about the 200 character long path, you could at least warn about this when creating a project or at least mention it in the documentation. But preferred solution would be not to create so long paths.
Solution 1: Every user does tricks to get around the angular-cli problems.
Solution 2: Users just don't use angular-cli as it is too hard
Solution 3: angular-cli is fixed so that it is easy to use
I have not seen any other package installed by npm to create paths this deep, so I have to assume the problem is somehow related either to angular-cli or the packages it uses.
I don't have the skills nor time to provide a fix for this issue (to angular-cli), so the best I could do is to bring the issue into your attention. I hope that you can provide a real fix to the angular-cli so that it doesn't create paths so deep.
I have not seen any other package installed by npm to create paths this deep, so I have to assume the problem is somehow related either to angular-cli or the packages it uses.
This is not an angular-cli problem. It's an npm and Windows problem. Specifically with some of the third-party dependencies.
This problem is not unique to this project in any way. Almost every Yeoman scaffold and seed project I use has npm dependencies that break the Windows limit. This is a very common issue and has been for a long time. At least a couple years.
OK, but even if this problem is not unique to angular-cli, it still exists in angular-cli. If it is caused by a bug in npm, it is OK for me to link this ticket to npm ticket and wait for a fix and once the npm is fixed, this ticket can be closed.
It could be that there are still bugs in npm and their planned system does not work(?), but it looks to me, that if angular-cli and all its dependencies would use the same versions of every package, everything should be flat. So simply upgrading some packages that give deepest paths, might give at least some help for this issue.
Activity
rburnham52 commentedon Jul 8, 2016
we had this problem with node before. i thought they had fixed it it in node 5, seems like they haven't completely fixed it
http://stackoverflow.com/questions/26155135/node-npm-windows-file-paths-are-too-long-to-install-packages
There are a couple of workarounds for this.I think using the rmdir command is the easiest
http://superuser.com/questions/78434/how-to-delete-directories-with-path-names-too-long-for-normal-delete
jkuri commentedon Jul 8, 2016
Thanks @Nitro52. @aggro80 did that solved your issue?
alexpaluzzi commentedon Jul 11, 2016
I have
rimrafinstalled globally for this reason on my Windows boxes. It works great.npm i rimraf -grimraf directory/Be careful, of course.
aggro80 commentedon Jul 13, 2016
Solution 1: Every user does tricks to get around the angular-cli problems.
Solution 2: Users just don't use angular-cli as it is too hard
Solution 3: angular-cli is fixed so that it is easy to use
I have not seen any other package installed by npm to create paths this deep, so I have to assume the problem is somehow related either to angular-cli or the packages it uses.
I don't have the skills nor time to provide a fix for this issue (to angular-cli), so the best I could do is to bring the issue into your attention. I hope that you can provide a real fix to the angular-cli so that it doesn't create paths so deep.
alexpaluzzi commentedon Jul 13, 2016
This is not an
angular-cliproblem. It's annpmandWindowsproblem. Specifically with some of the third-party dependencies.This problem is not unique to this project in any way. Almost every Yeoman scaffold and seed project I use has
npmdependencies that break the Windows limit. This is a very common issue and has been for a long time. At least a couple years.aggro80 commentedon Jul 15, 2016
OK, but even if this problem is not unique to angular-cli, it still exists in angular-cli. If it is caused by a bug in npm, it is OK for me to link this ticket to npm ticket and wait for a fix and once the npm is fixed, this ticket can be closed.
That being said, this issue should have been fixed already in npm3:
https://docs.npmjs.com/how-npm-works/npm3
It could be that there are still bugs in npm and their planned system does not work(?), but it looks to me, that if angular-cli and all its dependencies would use the same versions of every package, everything should be flat. So simply upgrading some packages that give deepest paths, might give at least some help for this issue.
filipesilva commentedon Jul 28, 2016
This issue was caused by a bug in the CLI that caused an older version of npm to be used. It was fixed in #1250.
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.