簡體   English   中英

NodeJS和Gulp會拋出錯誤

[英]NodeJS and Gulp throws an error

當我嘗試運行Gulp手表時遇到問題。

這是拋出的錯誤:

[15:42:57] Using gulpfile ~/bartslaw-nyc/Gulpfile.js
[15:42:57] Starting 'browserSync'...
[15:42:57] Finished 'browserSync' after 17 ms
[15:42:57] Starting 'clean'...
[15:42:57] Finished 'clean' after 5.25 ms
[15:42:57] Starting 'pages'...
[15:42:57] 'pages' errored after 6.59 ms
[15:42:57] TypeError: Cannot read property 'length' of undefined
    at flattenGlob (/home/k7/bartslaw-nyc/node_modules/glob2base/index.js:9:25)
    at setToBase (/home/k7/bartslaw-nyc/node_modules/glob2base/index.js:48:12)
    at module.exports (/home/k7/bartslaw-nyc/node_modules/glob2base/index.js:56:19)
    at Object.gs.createStream (/home/k7/bartslaw-nyc/node_modules/glob-stream/index.js:34:42)
    at Object.gs.create (/home/k7/bartslaw-nyc/node_modules/glob-stream/index.js:68:42)
    at Gulp.src (/home/k7/bartslaw-nyc/node_modules/vinyl-fs/lib/src/index.js:33:23)
    at Gulp.<anonymous> (/home/k7/bartslaw-nyc/Gulpfile.js:44:15)
    at module.exports (/home/k7/bartslaw-nyc/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/home/k7/bartslaw-nyc/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/home/k7/bartslaw-nyc/node_modules/orchestrator/index.js:214:10)
[BS] Access URLs:
 ------------------------------------
       Local: http://localhost:3000
    External: http://192.168.1.3:3000
 ------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.1.3:3001
 ------------------------------------
[BS] Serving files from: _build

問題是在我的瀏覽器上只有“無法獲取/”。 幫助我解決這個問題。 這似乎突然發生了。

我在Bitbucket上有一個存儲庫,我從中獲取了啟動源文件(這個存儲庫是由我創建和維護的)。

歡迎任何幫助。 提前致謝。 如果您需要查看gulp.config和gulpfile.js,請告訴我

我認為它發生的原因是npm軟件包更新版本號沒有被碰到

現在似乎有一個問題。 您可以按照以下討論進行操作: https//github.com/gulpjs/gulp/issues/1768

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM