- I loaded an existing project that worked fine without nodejs tools
- `npm install` had already been performed
- I created a nodejs tools project for this folder
- In Solution Explorer, the npm node was empty
- Right-click npm > manage npm modules
Error: Unable to parse package.json from your project. Please fix any errors and try again.
- I decided to delte my `node_modules` folder and open the project again
- When I tried to delete the node_module the OS complained about a file begin too long:
```
d:\sources\myproject\Sources\WebServices\static\node_modules\grunt
-jscs-checker\node_modules\lodash.assign\node_modules\lodash._basecreatecallback\node_modules\lodash
.bind\node_modules\lodash._createwrapper\node_modules\lodash._basecreatewrapper\node_modules\lodash.
_basecreate\node_modules\lodash._isnative\
```
- I deleted the folder using the [robocopy trick](http://superuser.com/questions/45697/how-to-delete-a-file-in-windows-with-a-too-long-filename)
- I reloaded the project and this time, the npm folder was able to show the dependencies with the *missing* indication.
- I launched Update npm modules command from the npm node in Solution Explorer
- The end of the log is:
```
npm http 304 https://registry.npmjs.org/estraverse
npm http 304 https://registry.npmjs.org/esshorten
npm http 304 https://registry.npmjs.org/escope
====npm command completed with exit code 0====
Error reading package.json at 'D:\sources\myprojecy\Sources\WebServices\static\package.json': Unable to read package.json. Please ensure the file is valid JSON.
Reading failed because the following error occurred:
Reading failed because the following error occurred:
Additional text encountered after finished reading JSON content: n. Path '', line 40, position 1.
Caused by:
Unable to read package.json. Please ensure the file is valid JSON.
Reading failed because the following error occurred:
Additional text encountered after finished reading JSON content: n. Path '', line 40, position 1.
Caused by:
Additional text encountered after finished reading JSON content: n. Path '', line 40, position 1.
```
- So think there is an issue with the npm features and long file names.
Comments: This post has been made on April 10th. It's now the 8th of December. I stumbled upon this because I'm still having the same issue, with every workaround just giving me some space for breath without solving the actual problem. Due to ASP.NET vNext that heavily relies on node, I guess this needs to be addressed with a high priority, because it basically makes the whole system unusable. So - any updates on this?
- `npm install` had already been performed
- I created a nodejs tools project for this folder
- In Solution Explorer, the npm node was empty
- Right-click npm > manage npm modules
Error: Unable to parse package.json from your project. Please fix any errors and try again.
- I decided to delte my `node_modules` folder and open the project again
- When I tried to delete the node_module the OS complained about a file begin too long:
```
d:\sources\myproject\Sources\WebServices\static\node_modules\grunt
-jscs-checker\node_modules\lodash.assign\node_modules\lodash._basecreatecallback\node_modules\lodash
.bind\node_modules\lodash._createwrapper\node_modules\lodash._basecreatewrapper\node_modules\lodash.
_basecreate\node_modules\lodash._isnative\
```
- I deleted the folder using the [robocopy trick](http://superuser.com/questions/45697/how-to-delete-a-file-in-windows-with-a-too-long-filename)
- I reloaded the project and this time, the npm folder was able to show the dependencies with the *missing* indication.
- I launched Update npm modules command from the npm node in Solution Explorer
- The end of the log is:
```
npm http 304 https://registry.npmjs.org/estraverse
npm http 304 https://registry.npmjs.org/esshorten
npm http 304 https://registry.npmjs.org/escope
====npm command completed with exit code 0====
Error reading package.json at 'D:\sources\myprojecy\Sources\WebServices\static\package.json': Unable to read package.json. Please ensure the file is valid JSON.
Reading failed because the following error occurred:
Reading failed because the following error occurred:
Additional text encountered after finished reading JSON content: n. Path '', line 40, position 1.
Caused by:
Unable to read package.json. Please ensure the file is valid JSON.
Reading failed because the following error occurred:
Additional text encountered after finished reading JSON content: n. Path '', line 40, position 1.
Caused by:
Additional text encountered after finished reading JSON content: n. Path '', line 40, position 1.
```
- So think there is an issue with the npm features and long file names.
Comments: This post has been made on April 10th. It's now the 8th of December. I stumbled upon this because I'm still having the same issue, with every workaround just giving me some space for breath without solving the actual problem. Due to ASP.NET vNext that heavily relies on node, I guess this needs to be addressed with a high priority, because it basically makes the whole system unusable. So - any updates on this?