我使用Windows 10的企业计算机.我有nodejs v6.10.0和npm v3.10.10.这是我第一次在这台计算机上安装nodejs/npm.
当我安装模块(例如,任何类型的模块)时,npm install jsdoc
一切正常.我可以打example.js
几次电话,一切都好.
但过了一段时间(随机期)我不能再运行我的程序,因为我得到以下错误:
>node example.js
module.js:96
throw e;
^
SyntaxError: Error parsing C:\my_path\node_modules\some_module\package.json: Unexpected token x in JSON at position 0
Run Code Online (Sandbox Code Playgroud)
如果我检查了package.json
SublimeText 的内容,我得到了:
78c0 b658 72a3 e0f5 7832 e7d4 b5ee dcc8
8f00 9951 3b8a cbd5 db7f 4556 5e8b e88d
087d 9bb8 ff15 9acb 0a09 7aaf afd3 ced2
3aa9 e2c5 7e7b c4a1 7b82 a332 2848 83ed
adca d7e8 3228 5537 64eb 3105 2338 6ae2
[...]
Run Code Online (Sandbox Code Playgroud)
实际上,这个项目的所有package.json
文件node_modules
都已损坏....对于所有模块! …