简体   繁体   English

NodeJS和Gulp会抛出错误

[英]NodeJS and Gulp throws an error

I am having a problem when I try to run Gulp watch. 当我尝试运行Gulp手表时遇到问题。

Here's the error being thrown: 这是抛出的错误:

[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

The issue is that on my browser there's just "Cannot GET /". 问题是在我的浏览器上只有“无法获取/”。 Help me out on this one. 帮助我解决这个问题。 This seems to have happened all of a sudden. 这似乎突然发生了。

I have a repository on Bitbucket from where I pulled the initiate source files (this repository is created and maintained by me). 我在Bitbucket上有一个存储库,我从中获取了启动源文件(这个存储库是由我创建和维护的)。

Any help is welcome. 欢迎任何帮助。 Thanks in advance. 提前致谢。 Do let me know if you need to see the gulp.config and gulpfile.js 如果您需要查看gulp.config和gulpfile.js,请告诉我

我认为它发生的原因是npm软件包更新版本号没有被碰到

It seems like there has an issue right now. 现在似乎有一个问题。 You can follow the discussion below: https://github.com/gulpjs/gulp/issues/1768 您可以按照以下讨论进行操作: https//github.com/gulpjs/gulp/issues/1768

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM