这是我使用命令的环境ionic info
Your system information:
Cordova CLI: 5.3.3
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.5
Ionic App Lib Version: 0.3.9
OS: Windows 8
Node Version: v4.1.1
当我运行命令npm install
时,我收到以下错误:
node-sass@2.1.1 install C:\Users\FIDEL-CASA\Desktop\prueba\dsfasdfa\fidel\node
modules\gulp-sass\nodemodules\node-sass
node scripts/install.js
Can not download file from https://raw.githubusercontent.com/sass/node-sass-binaries/v2.1.1/win32-x64-node-4.1/binding.node
node-sass@2.1.1 postinstall C:\Users\FIDEL-CASA\Desktop\prueba\dsfasdfa\fidel\
node_modules\gulp-sass\node_modules\node-sass
node scripts/build.js
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading 64-bit node.lib
gyp ERR! stack at Request. (C:\Users\FIDEL-CASA\Desktop\prueba\ds
fasdfa\fidel\node_modules\gulp-sass\node_modules\node-sass\node_modules\pangyp\l
ib\install.js:403:20)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:169:7)
gyp ERR! stack at Request.onRequestResponse (C:\Users\FIDEL-CASA\Desktop\pru
eba\dsfasdfa\fidel\node_modules\gulp-sass\node_modules\node-sass\node_modules\pa
ngyp\node_modules\request\request.js:1255:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:169:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (httpclient.js:415:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (httpcommon.js:88:23)
gyp ERR! stack at Socket.socketOnData (httpclient.js:305:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\FIDEL-CASA\D
esktop\prueba\dsfasdfa\fidel\node_modules\gulp-sass\node_modules\node-sas
s\node_modules\pangyp\bin\node-gyp" "rebuild"
gyp ERR! cwd C:\Users\FIDEL-CASA\Desktop\prueba\dsfasdfa\fidel\node_modules\gulp
-sass\node_modules\node-sass
gyp ERR! node -v v4.1.1
gyp ERR! pangyp -v v2.3.2
gyp ERR! not ok
Build failed
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! path C:\Users\FIDEL-CASA\AppData\Roaming\npm-cache\lodash.template\3.6.
2\package\package.json.85c499c6dffff9035680b8e91062bf92
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\FIDEL-CASA\AppD
ata\Roaming\npm-cache\lodash.template\3.6.2\package\package.json.85c499c6dffff90
35680b8e91062bf92' -> 'C:\Users\FIDEL-CASA\AppData\Roaming\npm-cache\lodash.temp
late\3.6.2\package\package.json'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, rename 'C:\Users\FIDEL-CASA\
AppData\Roaming\npm-cache\lodash.template\3.6.2\package\package.json.85c499c6dff
ff9035680b8e91062bf92' -> 'C:\Users\FIDEL-CASA\AppData\Roaming\npm-cache\lodash.
template\3.6.2\package\package.json']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\Users\FIDEL-CASA\AppData\Roaming\npm-cache\lodash.tem
plate\3.6.2\package\package.json.85c499c6dffff9035680b8e91062bf92',
npm ERR! dest: 'C:\Users\FIDEL-CASA\AppData\Roaming\npm-cache\lodash.tem
plate\3.6.2\package\package.json',
npm ERR! parent: 'gulp-util' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\FIDEL-CASA\Desktop\prueba\dsfasdfa\fidel\npm-debug.log
我认为问题是由"gulp-sass": "^1.3.3"
使用"node-sass" : "^2.0.1"
. 这里https://goo.gl/jFeu7s说这个 node-sass 版本不适用于 node v4.1.1,它甚至不适用于 node v4.0.0。
在这种情况下,您是否建议返回节点 v0.12.7 ?
为什么 Ionic 不使用更新的 gulp-sass 版本来解决这个问题?