繁体   English   中英

无法为Ionic安装node-sass

[英]can't install node-sass for Ionic

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

我将nvmnode v4.0.0npm 3.8.0 ,当我运行sudo npm install -g node-sass此错误

$ sudo npm install -g node-sass
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm 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.js

module.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-MANJARO
npm 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.0
npm ERR! npm  v3.8.0
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.4.2 install: `node scripts/install.js`
npm ERR! Exit status 1
npm 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.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm 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.log
npm ERR! code 1

您能帮忙解决这个问题吗? 在使用node v5.0.0时它也node v5.0.0

谢谢

降级您的节点版本以使用node / 0.12.10 ...您可以使用类似n的名称来管理它。

npm安装n

您是否尝试过sudo ln -s /usr/bin/nodejs /usr/bin/node吗? 就我而言,这有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM