gpt4 book ai didi

node.js - 无法为 Ionic 安装 node-sass

转载 作者:太空宇宙 更新时间:2023-11-03 23:33:07 26 4
gpt4 key购买 nike

我正在尝试安装 node-sass 以便与 Ionic 一起使用,但这是不可能的。

我将 nvmnode v4.0.0npm 3.8.0 结合使用,当我运行 sudo npm install -g node-sass 时,出现此错误

$ sudo npm install -g node-sassnpm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npmnpm WARN deprecated lodash@1.0.2: lodash@ /home/xx/.nvm/versions/node/v4.0.0/lib/node_modules/node-sass/bin/node-sass> node-sass@3.4.2 install /home/xx/.nvm/versions/node/v4.0.0/lib/node_modules/node-sass> node scripts/install.jsmodule.js:338    throw err;          ^Error: Cannot find module '/home/xx/.nvm/versions/node/v4.0.0/lib/node_modules/node-sass/scripts/install.js'    at Function.Module._resolveFilename (module.js:336:15)    at Function.Module._load (module.js:278:25)    at Function.Module.runMain (module.js:501:10)    at startup (node.js:129:16)    at node.js:814:3/home/xx/.nvm/versions/node/v4.0.0/lib└── (empty)npm ERR! Linux 4.1.18-2-MANJAROnpm ERR! argv "/home/xx/.nvm/versions/node/v4.0.0/bin/node" "/home/xx/.nvm/versions/node/v4.0.0/bin/npm" "install" "-g" "node-sass"npm ERR! node v4.0.0npm ERR! npm  v3.8.0npm ERR! code ELIFECYCLEnpm ERR! node-sass@3.4.2 install: `node scripts/install.js`npm ERR! Exit status 1npm ERR! npm ERR! Failed at the node-sass@3.4.2 install script 'node scripts/install.js'.npm ERR! Make sure you have the latest version of node.js and npm installed.npm ERR! If you do, this is most likely a problem with the node-sass package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR!     node scripts/install.jsnpm ERR! You can get information on how to open an issue for this project with:npm ERR!     npm bugs node-sassnpm ERR! Or if that isn't available, you can get their info via:npm ERR!     npm owner ls node-sassnpm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:npm ERR!     /home/xx/npm-debug.lognpm ERR! code 1

您能帮忙解决一下这个问题吗?使用 node v5.0.0

时它也不起作用

谢谢

最佳答案

降级你的 Node 版本以使用node/0.12.10 ...你可以使用n之类的东西来管理它..

npm 安装

关于node.js - 无法为 Ionic 安装 node-sass,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35849043/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com