以下是我尝试安装时的内容。
安装“language-babel@2.68.0”失败。隐藏输出......
npm ERR! Linux 4.8.0-59-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/nits-50/.atom/.apm/.apmrc" "--userconfig" "/home/nits-50/.atom/.apmrc" "install" "/tmp/d-11773-7444-h2ynxl.fnq37n9udi/package.tgz" "--runtime=electron" "--target=1.3.15" "--arch=x64" "--global-style"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! file /home/nits-50/.atom/.apm/core-js/2.4.1/package/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /home/nits-50/.atom/.apm/core-js/2.4.1/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/apm-install-dir-11773-7444-1ijqiaq.s2apkwewmi/npm-debug.log
答案 0 :(得分:0)
好的解决方案(很奇怪):
我发现/home/nits-50/.atom/.apm/core-js/2.4.1/package/package.json什么都没有..所以它导致了json解析错误。
我只是删除了这个文件。它起作用了。