npm install --global foundation-cli不起作用

时间:2018-10-05 13:28:03

标签: python npm zurb-foundation frontend

我有Windows 10(节点8.11.1)。我想安装Foundation-Cli Globaly(因为它在本地也不起作用)。但是安装不起作用。我在任何控制台(powerShell,gitBash,jetBrains)上都有这些错误:

PS C:\> npm install --global foundation-cli
npm WARN deprecated bower@1.8.4: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm ERR! path C:\Users\user\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\node_modules\ansistyles
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\user\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\node_modules\ansistyles' -> 'C:\Users\user\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\node_modules\.ansistyles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-10-05T12_43_07_631Z-debug.log

我怀疑这里的问题出在python路径上。我有Microsoft构建工具,我尝试过:

npm config set python "C:\python27\python.exe"

但这没有帮助。什么都没发生。 你有什么主意吗?

1 个答案:

答案 0 :(得分:1)

这可能与Python无关。

npm --version输出什么? 如果不是6.4.1,请尝试npm i -g npm@latest升级npm。

还尝试在安装过程中禁用任何活动的防病毒扫描程序。