【问题标题】:npm install --global foundation-cli doesn't worknpm install --global Foundation-cli 不起作用
【发布时间】:2018-10-05 13:28:02
【问题描述】:

我有 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 路径上。我有微软构建工具,我试过了:

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

但这无济于事。没发生什么事。 你有什么想法吗?

【问题讨论】:

    标签: python npm zurb-foundation frontend


    【解决方案1】:

    这可能与 Python 无关。

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

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

    【讨论】:

    • 感谢您的回答,但无济于事。我还尝试了this windows 手册和this,但也没有用。我的力量耗尽了,我放弃了。现在我正在使用 ubuntu,这在我看来是唯一可能的解决方案。
    猜你喜欢
    • 1970-01-01
    • 2016-11-09
    • 2019-04-21
    • 1970-01-01
    • 2023-01-22
    • 1970-01-01
    • 2018-04-17
    • 2022-08-19
    • 2021-06-29
    相关资源
    最近更新 更多