简体   繁体   English

离子安装错误

[英]Error in ionic installation

I am installing ionic via sudo npm install ionic -g 我正在通过sudo npm install ionic -g安装ionic

and getting the following error 并得到以下错误

 /root/.nvm/versions/node/v4.2.2/bin/ionic -> /root/.nvm/versions/node/v4.2.2/lib/node_modules/ionic/bin/ionic > node-sass@3.4.2 install /root/.nvm/versions/node/v4.2.2/lib/node_modules/ionic/node_modules/node-sass > node scripts/install.js module.js:340 throw err; ^ Error: Cannot find module '/root/.nvm/versions/node/v4.2.2/lib/node_modules/ionic/node_modules/node-sass/scripts/install.js' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 npm ERR! Linux 3.13.0-32-generic npm ERR! argv "/root/.nvm/versions/node/v4.2.2/bin/node" "/root/.nvm/versions/node/v4.2.2/bin/npm" "install" "ionic" "-g" npm ERR! node v4.2.2 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! node-sass@3.4.2 install: `node scripts/install.js` npm ERR! Exit status 8 npm ERR! npm ERR! Failed at the node-sass@3.4.2 install script 'node scripts/install.js'. npm ERR! 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 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! /root/npm-debug.log 

The issue is also listed in ionic forums: - https://forum.ionicframework.com/t/installing-ionic-not-successful-solved/36050/7 离子论坛中也列出了该问题:-https: //forum.ionicframework.com/t/installing-ionic-not-successful-solved/36050/7

I have tried changing node, npm, cordova versions multiple times but every time I get this error so I guess this has nothing to do with versions. 我曾尝试多次更改节点,npm,cordova版本,但是每次遇到此错误时,我都认为这与版本无关。 Also at some places it was mentioned that installing ionic from root might help so I have done that also. 在某些地方,有人提到从根目录安装离子可能会有所帮助,所以我也这样做了。

Kindly help me figure out this one. 请帮助我找出这一点。 Thanks 谢谢

Easy way to install ionic-framework follow in Nic-raboy bolg here. Nic-raboy bolg的安装离子框架的简单方法如下。

chmod 775 ubuntu_ionic_installer.sh
sudo ./ubuntu_ionic_installer.sh

Download the ubuntu_ionic_installer.sh from the **download a convenient shell script** which is provided in the blog and then follow the steps and sit back and relax. 从博客中提供的“ **download a convenient shell script**下载ubuntu_ionic_installer.sh,然后按照步骤操作,然后坐下来放松身心。

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

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