Skip to content
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

"Files in your project exceed MAX_PATH, please move your project to a location with a shorter path" after upgrading to Windows 10 #341

Closed
kant2002 opened this issue Aug 1, 2015 · 5 comments

Comments

@kant2002
Copy link
Contributor

kant2002 commented Aug 1, 2015

That's should be a bit another issue then #69
I have everything working in Windows 8.1, I use custom debug build (almost fresh, but a bit before RC in case this is important).
Now after upgrade to Windows 10, after I open the project, during build I receive error Files in your project exceed MAX_PATH, please move your project to a location with a shorter path.

Now I could not run my Express project

@mousetraps mousetraps changed the title MAX_PATH issue Files in your project exceed MAX_PATH, please move your project to a location with a shorter path after upgrading to Windows 10 Aug 2, 2015
@mousetraps
Copy link
Contributor

Hmm, try running .npm install in the interactive window - that'll trigger the MAX_PATH check with details re: corresponding file paths.

And did anything change after the upgrade? updated npm pkgs? different username?

@mousetraps mousetraps changed the title Files in your project exceed MAX_PATH, please move your project to a location with a shorter path after upgrading to Windows 10 "Files in your project exceed MAX_PATH, please move your project to a location with a shorter path" after upgrading to Windows 10 Aug 2, 2015
@kant2002
Copy link
Contributor Author

kant2002 commented Aug 2, 2015

  1. My local path where project installed is like this:
    E:\1\1234\12345\123456-123
  2. Really I add two or more packages: I double ckecking which one is causing issue.
  3. I use TypeScript Node.JS project if this matters.
  4. Result of .npm install
> .npm install
install successfully completed
  1. My user right now is not local account, but Microsoft Account.

No checks triggered.

I really believe that build should works even if I have some content in node_modules exceed MAX_PATH.

Please see at https://github.com/Microsoft/nodejstools/blob/master/Nodejs/Product/Nodejs/Microsoft.NodejsTools.targets#L64

For me still not clear what purpose of check that in place. Is this for deployment to Azure?

@billti billti added this to the Future milestone Aug 20, 2015
@kant2002
Copy link
Contributor Author

I have mongoose, gulp-iconfont module installed which exceed MAX_PATH module.

Is it possible to move line below to different place.

<Error Condition="$(_NodeModulesContentProperty.IndexOf('*')) != -1"
           Text="Files in your project exceed MAX_PATH, please move your project to a location with a shorter path."></Error>

When I run this project within Visual Studio, all I want is just compile TypeScript files and start Node, no need to do other checks.

@mjbvz
Copy link
Contributor

mjbvz commented Apr 15, 2016

Sorry there was not better follow up here.

I've added a troubleshooting section with some more info about MAX_PATH. We will continue to add more info about MAX_PATH and workarounds as needed, and feel free to add any info that you think would be helpful.

Closing this issue for now since it is not clear if the bug is actionable or still a problem. If you are still encountering this problem and none of the work arounds are helping, please open a new bug to track the specific issue you are running into.

Thanks.

@mjbvz mjbvz closed this as completed Apr 15, 2016
@vputsenko
Copy link

vputsenko commented Feb 10, 2019

It still happens on 2019.. In my case it happens due to wrong value of ProjectHome property which in case of error has value of relative path ".". So <NodeModulesContent Include="$(ProjectHome)\node_modules\**\*.*"/> fails to match necessary files.
Repro with Visual Studio 15.9.6.
You can work for a while then when you add some packages to package.json it starts to happen. Since i haven't found rootcause yet, i changed definition of ProjectHome from "." to hardcoded full path in
the root project file. However it will not work on different environments

Update: looks like my solution also doesn't work ... Still repro even with hardcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants