# cat /etc/redhat-release
CentOS release 6.7 (Final)
当我运行npm prune && npm install && bower install && gulp build
我收到错误
> phantomjs@1.9.18 install /root/.builds/blog-theme/node_modules/gulp-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs
> node install.js
module.js:338
throw err;
^
Error: Cannot find module '/root/.builds/blog-theme/node_modules/gulp-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs/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
> spawn-sync@1.0.13 postinstall /root/.builds/blog-theme/node_modules/gulp-sass/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall
module.js:338
throw err;
^
Error: Cannot find module '/root/.builds/blog-theme/node_modules/gulp-sass/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync/postinstall'
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
npm ERR! Linux 2.6.32-573.3.1.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! phantomjs@1.9.18 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs@1.9.18 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/.builds/blog-theme/npm-debug.log
我正在运行新版本的node和npm。
# node --version
v0.12.7
# npm --version
2.11.3
# echo $NODE_PATH
/usr/local/lib/node_modules/
这是我的package.json
{
"name": "blog-theme",
"version": "1.0.8",
"description": "Blog theme",
"repository": {
"type": "git",
"url": "git://some.url.com/blog-theme.git"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "UNLICENSED",
"private": true,
"devDependencies": {
"bower": "^1.4.1",
"glob": "^5.0.10",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^2.3.1",
"gulp-bump": "^0.3.1",
"gulp-filter": "^2.0.2",
"gulp-git": "^1.2.4",
"gulp-jshint": "^1.11.0",
"gulp-load-plugins": "^0.10.0",
"gulp-minify-css": "^1.1.6",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.0.1",
"gulp-sourcemaps": "^1.5.2",
"gulp-tag-version": "^1.2.1",
"gulp-uglify": "^1.2.0",
"gulp-uncss": "^1.0.1",
"jshint-stylish": "^0.4.0",
"lodash": "^3.9.3"
}
}
bower.json
{
"name": "blog-theme",
"version": "1.0.8",
"description": "Blog theme",
"license": "None granted",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"bootstrap-sass-official": "~3.2.0",
"font-awesome": "~4.2.0"
}
}
我绝对不是一名前端开发人员,而且我已经坚持了大约一天了。问题是什么?