跑不起来哦。
Closed this issue · 2 comments
verglas commented
1,安装node.js最新版;
2,下载JGulp最新版ZIP解压;
3,创建config.json并修改key;
4,gulp build 运行出错:
You need to have Ruby and Compass installed and in your system PATH for this task to work.
下载
http://rubyinstaller.org/downloads/,
安装(要翻墙)
gem install compass
5,gulp build 运行出错:
D:\xampp1\htdocs\JGulp-master>gulp build
[15:20:40] Using gulpfile D:\xampp1\htdocs\JGulp-master\gulpfile.js
[15:20:40] Starting 'build'...
gulp.run() has been deprecated. Use task dependencies or gulp.watch task trigger
ing instead.
[15:20:40] Starting 'imagemin'...
[15:20:40] Starting 'compass'...
[15:20:40] Finished 'compass' after 4.99 ms
[15:20:40] Starting 'minifyjs'...
[15:20:40] Finished 'minifyjs' after 2.47 ms
[15:20:40] Starting 'alljs'...
[15:20:40] Starting 'buildfiles'...
[15:20:40] Finished 'buildfiles' after 3.12 ms
[15:20:40] Starting 'rename'...
[15:20:40] Finished 'build' after 31 ms
[15:20:40] Finished 'alljs' after 19 ms
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn D:\xampp1\htdocs\JGulp-master\node_modules\gulp-imagemin\node_modul
es\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\vendor\optipn
g.exe ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
环境:
D:\xampp1\htdocs\JGulp-master>ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]
D:\xampp1\htdocs\JGulp-master>npm -v
2.7.4
D:\xampp1\htdocs\JGulp-master>compass -v
Compass 1.0.3 (Polaris)
Copyright (c) 2008-2015 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compas
s
D:\xampp1\htdocs\JGulp-master>node -v
v0.12.2
D:\xampp1\htdocs\JGulp-master>gulp build2
[15:33:13] Using gulpfile D:\xampp1\htdocs\JGulp-master\gulpfile.js
[15:33:13] Starting 'build2'...
gulp.run() has been deprecated. Use task dependencies or gulp.watch task trigger
ing instead.
[15:33:13] Starting 'tinypng'...
[15:33:13] Finished 'tinypng' after 8.55 ms
[15:33:13] Starting 'compass'...
[15:33:13] Finished 'compass' after 4.23 ms
[15:33:13] Starting 'minifyjs'...
[15:33:13] Finished 'minifyjs' after 2.04 ms
[15:33:13] Starting 'alljs'...
[15:33:13] Starting 'buildfiles'...
[15:33:13] Finished 'buildfiles' after 2.98 ms
[15:33:13] Starting 'rename'...
[15:33:13] Finished 'build2' after 28 ms
[15:33:13] Finished 'alljs' after 16 ms
[15:33:14] Finished 'rename' after 46 ms
[15:33:14] LoadError on line ["54"] of C: cannot load such file -- compass-norma
lize
Run with --trace to see the full backtrace
[15:33:14] Plumber found unhandled error:
Error in plugin 'gulp-compass'
Message:
Compass failed
Details:
fileName: D:\xampp1\htdocs\JGulp-master\sass\style.scss
[15:33:21] gulp-tingpng: [compressing] ✔ info.png (done)
Jeff2Ma commented
删除 node_modules 文件夹然后重新 npm install
试试
verglas commented
不行哦
D:\xampp1\htdocs\JGulp-master>npm install --global gulp
C:\Users\Administrator\AppData\Roaming\npm\gulp -> C:\Users\Administrator\AppDat
a\Roaming\npm\node_modules\gulp\bin\gulp.js
gulp@3.8.11 C:\Users\Administrator\AppData\Roaming\npm\node_modules\gulp
├── pretty-hrtime@0.2.2
├── interpret@0.3.10
├── deprecated@0.0.1
├── archy@1.0.0
├── minimist@1.1.1
├── semver@4.3.4
├── tildify@1.0.0 (user-home@1.1.1)
├── v8flags@2.0.5 (user-home@1.1.1)
├── chalk@0.5.1 (ansi-styles@1.1.0, escape-string-regexp@1.0.3, supports-colo
r@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0)
├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream
@0.1.5)
├── liftoff@2.1.0 (extend@2.0.1, rechoir@0.6.1, flagged-respawn@0.3.1, resolv
e@1.1.6, findup-sync@0.2.1)
├── gulp-util@3.0.4 (array-differ@1.0.0, beeper@1.0.0, array-uniq@1.0.2, obje
ct-assign@2.0.0, lodash._reevaluate@3.0.0, lodash._reescape@3.0.0, lodash._reint
erpolate@3.0.0, replace-ext@0.0.1, vinyl@0.4.6, chalk@1.0.0, through2@0.6.5, mul
tipipe@0.1.2, lodash.template@3.6.1, dateformat@1.0.11)
└── vinyl-fs@0.3.13 (graceful-fs@3.0.7, mkdirp@0.5.1, strip-bom@1.0.0, defaul
ts@1.0.2, vinyl@0.4.6, through2@0.6.5, glob-stream@3.1.18, glob-watcher@0.0.6)
D:\xampp1\htdocs\JGulp-master>gulp build
[17:13:59] Local gulp not found in D:\xampp1\htdocs\JGulp-master
[17:13:59] Try running: npm install gulp