Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js Visual Studio 2013 - path too long error

I am getting this error when trying to open my solution in VS with Node.js tools loaded:

error : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

My project path cannot be shorter, I am on the root of my drive. I can open the solution if I move the "node_modules" folder out of the solution folder, so it seems to be something in there.

like image 464
iss42 Avatar asked Dec 04 '25 05:12

iss42


1 Answers

  1. During release build, You can prevent Visual studio scanning these files / folder by setting the folder properties as a Hidden folder (JUST set it to node_modules). Reference: http://issues.umbraco.org/issue/U4-6219#comment=67-19103

  2. You can exclude files or folder that are published during packaging by including following XML node in the CsProject file.

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
...
<OutputPath>bin\</OutputPath>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <ExcludeFilesFromDeployment>File1.aspx;File2.aspx</ExcludeFilesFromDeployment> <ExcludeFoldersFromDeployment>Folder1;Folder2 </PropertyGroup>

like image 136
David Chelliah Avatar answered Dec 05 '25 19:12

David Chelliah