Atom:无法安装linter-ui-default软件包

时间:2018-07-06 13:06:32

标签: atom-editor linter

我想在最新的原子编辑器中使用linter,所以我在新安装的编辑器上尝试了以下命令:

C:\Users\rmishra>apm install linter-ui-default
Installing linter-ui-default to C:\Users\rmishra\.atom\packages failed

这是安装软件包时的错误:

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\rmishra\AppDat
a\Local\Temp\apm-install-dir-11869-10100-7lyqkv.gak66wp14i\package.json'
npm WARN apm-install-dir-11869-10100-7lyqkv.gak66wp14i No description
npm WARN apm-install-dir-11869-10100-7lyqkv.gak66wp14i No repository field.
npm WARN apm-install-dir-11869-10100-7lyqkv.gak66wp14i No README data
npm WARN apm-install-dir-11869-10100-7lyqkv.gak66wp14i No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Users\\rmishra\\AppData\\Local\\atom\\app-1.28.0-beta1\\resou
rces\\app\\apm\\bin\\node.exe" "C:\\Users\\rmishra\\AppData\\Local\\atom\\app-1.
28.0-beta1\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalco
nfig" "C:\\Users\\rmishra\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\rmish
ra\\.atom\\.apmrc" "install" "C:\\Users\\rmishra\\AppData\\Local\\Temp\\d-11869-
10100-far1m8.8vs517zaor\\package.tgz" "--runtime=electron" "--target=2.0.1" "--a
rch=x64" "--global-style"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! path C:\Users\rmishra\AppData\Local\Temp\apm-install-dir-11869-10100-7l
yqkv.gak66wp14i\node_modules\linter-ui-default
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\rmishra\AppData
\Local\Temp\apm-install-dir-11869-10100-7lyqkv.gak66wp14i\node_modules\linter-ui
-default' -> 'C:\Users\rmishra\AppData\Local\Temp\apm-install-dir-11869-10100-7l
yqkv.gak66wp14i\node_modules\.linter-ui-default.DELETE'
npm ERR!     at moveAway (C:\Users\rmishra\AppData\Local\atom\app-1.28.0-beta1\r
esources\app\apm\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR!     at destStatted (C:\Users\rmishra\AppData\Local\atom\app-1.28.0-beta
1\resources\app\apm\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR!     at C:\Users\rmishra\AppData\Local\atom\app-1.28.0-beta1\resources\a
pp\apm\node_modules\npm\node_modules\graceful-fs\polyfills.js:267:18
npm ERR!     at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\rmishra\AppData
\Local\Temp\apm-install-dir-11869-10100-7lyqkv.gak66wp14i\node_modules\linter-ui
-default' -> 'C:\Users\rmishra\AppData\Local\Temp\apm-install-dir-11869-10100-7l
yqkv.gak66wp14i\node_modules\.linter-ui-default.DELETE'
npm ERR!     at Error (native)
npm ERR!  Error: EPERM: operation not permitted, rename 'C:\Users\rmishra\AppDat
a\Local\Temp\apm-install-dir-11869-10100-7lyqkv.gak66wp14i\node_modules\linter-u
i-default' -> 'C:\Users\rmishra\AppData\Local\Temp\apm-install-dir-11869-10100-7
lyqkv.gak66wp14i\node_modules\.linter-ui-default.DELETE'
npm ERR!     at moveAway (C:\Users\rmishra\AppData\Local\atom\app-1.28.0-beta1\r
esources\app\apm\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR!     at destStatted (C:\Users\rmishra\AppData\Local\atom\app-1.28.0-beta
1\resources\app\apm\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR!     at C:\Users\rmishra\AppData\Local\atom\app-1.28.0-beta1\resources\a
pp\apm\node_modules\npm\node_modules\graceful-fs\polyfills.js:267:18
npm ERR!     at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\rmishra\AppData
\Local\Temp\apm-install-dir-11869-10100-7lyqkv.gak66wp14i\node_modules\linter-ui
-default' -> 'C:\Users\rmishra\AppData\Local\Temp\apm-install-dir-11869-10100-7l
yqkv.gak66wp14i\node_modules\.linter-ui-default.DELETE'
npm ERR!     at Error (native)
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\rmishra\AppData\Local\Temp\apm-install-dir-11869-10100-7ly
qkv.gak66wp14i\npm-debug.log

我也尝试过here所述的apm clean,但没有用。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

它正在尝试在指定位置搜索package.json。您可以尝试几件事。

  1. 确保您对给定目录具有写访问权。
  2. 尝试使用npm init command手动创建package.json
  3. 手动创建目录并将package.json粘贴在该目录上,然后尝试再次运行命令。

希望这会有所帮助。