尝试安装ionic时出现以下错误:
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! node v0.13.0-pre
npm ERR! npm v2.1.18
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your version of node/npm: gulp@3.8.8
npm ERR! notsup Required: {"node":">= 0.9"}
npm ERR! notsup Actual: {"npm":"2.1.18","node":"0.13.0-pre"}
npm ERR! Please include the following file with any support request:
npm ERR! /Users/taylorsuk/npm-debug.log
npm-debug.log的详细信息如下:
29053 verbose unlock done using /Users/taylorsuk/.npm/_locks/cordova-f29da3a706471ecd.lock for /Users/taylorsuk/.npm-packages/lib/node_modules/cordova
29054 verbose stack Error: Unsupported
29054 verbose stack at checkEngine (/usr/local/lib/node_modules/npm/node_modules/npm-install-checks/index.js:16:16)
29054 verbose stack at Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
29054 verbose stack at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
29054 verbose stack at chain (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
29054 verbose stack at /usr/local/lib/node_modules/npm/lib/install.js:949:5
29054 verbose stack at /usr/local/lib/node_modules/npm/lib/utils/locker.js:40:9
29054 verbose stack at cb (/usr/local/lib/node_modules/npm/node_modules/lockfile/lockfile.js:149:38)
29054 verbose stack at /usr/local/lib/node_modules/npm/node_modules/lockfile/lockfile.js:171:16
29054 verbose stack at Object.oncomplete (fs.js:93:15)
29055 verbose pkgid gulp@3.8.8
29056 verbose cwd /Users/taylorsuk
29057 error Darwin 14.0.0
29058 error argv "node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
29059 error node v0.13.0-pre
29060 error npm v2.1.18
29061 error code ENOTSUP
29062 error notsup Unsupported
29062 error notsup Not compatible with your version of node/npm: gulp@3.8.8
29062 error notsup Required: {"node":">= 0.9"}
29062 error notsup Actual: {"npm":"2.1.18","node":"0.13.0-pre"}
29063 verbose exit [ 1, true ]
29064 verbose unbuild lib/node_modules/ionic
29065 info preuninstall ionic@1.3.2
29066 info uninstall ionic@1.3.2
29067 verbose unbuild rmStuff ionic@1.3.2 from /Users/taylorsuk/.npm-packages/lib/node_modules
29068 verbose gentlyRm verifying that /Users/taylorsuk/.npm-packages is managed by npm
29069 silly isManaged /Users/taylorsuk/.npm-packages is not inside /Users/taylorsuk/.npm-packages/lib/node_modules
29070 silly isManaged /Users/taylorsuk/.npm-packages is not inside /Users/taylorsuk/.npm-packages/lib/node_modules
29071 silly isManaged /Users/taylorsuk/.npm-packages is not inside /Users/taylorsuk/.npm-packages/bin
29072 silly isManaged /Users/taylorsuk/.npm-packages is inside /Users/taylorsuk/.npm-packages
29073 silly gentlyRm /Users/taylorsuk/.npm-packages is managed by npm
29074 silly gentlyRm /Users/taylorsuk/.npm-packages/bin/ionic is under /Users/taylorsuk/.npm-packages
29075 verbose gentlyRm vacuuming /Users/taylorsuk/.npm-packages/bin/ionic up to /Users/taylorsuk/.npm-packages
29076 info postuninstall ionic@1.3.2
29077 verbose gentlyRm vacuuming /Users/taylorsuk/.npm-packages/lib/node_modules/ionic
29078 silly gentlyRm purging /Users/taylorsuk/.npm-packages/lib/node_modules/ionic
29079 silly gentlyRm quitting because other entries in /Users/taylorsuk/.npm-packages/lib/node_modules`
我一直遇到在用户目录中安装node_modules的问题,而不是必须使用sudo
我已经通过添加.bash_profile
的路径来解决但是我无法再次安装离子。
答案 0 :(得分:0)
好的,
按照instructions:
完成节点安装Homebrew
运行brew doctor
使用brew prune
删除所有符号链接等
运行brew install node
然后运行npm install -g cordova ionic
我添加的其他步骤是删除/Users/username/.bash_profile
,因为我搞砸了一些符号链接。