gpt4 book ai didi

linux - 在 Linux 上安装 ionic ERR!s

转载 作者:太空狗 更新时间:2023-10-29 12:12:59 27 4
gpt4 key购买 nike

我想在 xUbuntu 上安装 Ionic。

当我执行 sudo npm install -g ionic 时,我得到以下输出,但不知道问题出在哪里。

npm WARN package.json eyes@0.1.8 No repository field.
npm WARN package.json faye-websocket@0.4.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json indexof@0.0.1 No repository field.
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic

> node-sass@3.4.2 install /usr/local/lib/node_modules/ionic/node_modules/node-sass
> node scripts/install.js

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! node-sass@3.4.2 install: `node scripts/install.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the node-sass@3.4.2 install script.
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! System Linux 4.2.0-27-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /home/sisko
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/sisko/npm-debug.log
npm ERR! not ok code 0

最佳答案

sh: 1: node: not found

这似乎是错误的原因。

您可能只需要安装旧版 nodejs 包:

sudo apt-get install nodejs-legacy

有关详细信息,请参阅 Cannot install packages using node package manager in Ubuntu

另一种选择是使用nvm https://github.com/creationix/nvm#installation ,它可以让你在不同版本的节点之间切换

nvm install node --reinstall-packages-from=node
nvm alias default node

关于linux - 在 Linux 上安装 ionic ERR!s,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35468353/

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