iT邦幫忙

0

glup 環境安裝問題

最近想研究glup
可是安裝上遇到問題,scss轉css都失敗,我看下面好像是npm的問題,有前輩能指點一下嗎

C:>npm install --global gulp
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
C:\Users\User\AppData\Roaming\npm\gulp -> C:\Users\User\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js

  • gulp@3.9.1
    updated 1 package in 18.392s

C:>
C:>
C:>gulp --version
[17:12:59] CLI version 3.9.1

C:>cd C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass

C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass>npm install gulp
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass\package.json'
npm WARN ironman-gulp-sass-0.1.sass No description
npm WARN ironman-gulp-sass-0.1.sass No repository field.
npm WARN ironman-gulp-sass-0.1.sass No README data
npm WARN ironman-gulp-sass-0.1.sass No license field.

  • gulp@3.9.1
    updated 1 package and audited 8283 packages in 24.45s
    found 24 vulnerabilities (6 low, 18 high)
    run npm audit fix to fix them, or npm audit for details

C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass>gulp --version
[17:14:08] CLI version 3.9.1
[17:14:08] Local version 3.9.1

C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass>
C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass>npm install gulp-sass --save-dev
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass\package.json'
npm WARN ironman-gulp-sass-0.1.sass No description
npm WARN ironman-gulp-sass-0.1.sass No repository field.
npm WARN ironman-gulp-sass-0.1.sass No README data
npm WARN ironman-gulp-sass-0.1.sass No license field.

  • gulp-sass@4.0.2
    updated 1 package and audited 8283 packages in 11.625s
    found 24 vulnerabilities (6 low, 18 high)
    run npm audit fix to fix them, or npm audit for details

C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass>

看更多先前的討論...收起先前的討論...
weiclin iT邦高手 4 級 ‧ 2018-10-17 19:04:47 檢舉
有沒有跑過這個? npm init
Zaku iT邦新手 3 級 ‧ 2018-10-18 09:43:42 檢舉
glup現在還推薦使用嗎?感覺越搞越雜
感謝大大成功了
我也是看網路推薦想說來用看看

2 個回答

0

這篇可以參考看看:
https://github.com/partyyaya/gulpLearning

感謝大大我重裝node就成功了
有問題的可以參考這篇
https://www.daimafans.com/question/d4153344689963008-p1-o1.html

0
fillano
iT邦超人 1 級 ‧ 2018-10-18 09:24:20

如同weiclin大大提示:

npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\User\Downloads\ironman-gulp-sass-0.1.sass\package.json'

這個訊息是警告你package.json檔案不存在。通常這個檔案需要跑npm init來產生(手動也可以,如果你熟悉package.json的格式)。不過沒有package.json也只是無法管理你安裝的模組,並不是不能跑。所以...

更關鍵的是,你沒貼gulpfile.js,尤其是你轉sass的task,這樣怎麼知道你怎麼跑的?

我要發表回答

立即登入回答