运行gulp --watch报错

发布于 2022-09-11 17:33:12 字数 3135 浏览 18 评论 0

图片描述

[21:16:03] Failed to load external module @babel/register
[21:16:03] Requiring external module babel-register
[21:16:04] Using gulpfile E:Demoes6gulpfile.babel.js
[21:16:04] Starting 'build'...
[21:16:04] Starting 'clean'...
[21:16:04] Finished 'clean' after 10 ms
[21:16:04] Starting 'css'...
[21:16:04] Finished 'css' after 13 ms
[21:16:04] Starting 'pages'...
[21:16:04] Finished 'pages' after 21 ms
[21:16:04] Starting 'scripts'...
[21:16:05] Plumber found unhandled error:
Error in plugin "webpack-stream"
Message:

multi ./app/js/index.js

Module not found: Error: Can't resolve 'babel' in 'E:Demoes6'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.

             You need to specify 'babel-loader' instead of 'babel',
             see https://webpack.js.org/migrate/3/#automatic-loader-module-name-extension-removed

resolve 'babel' in 'E:Demoes6'
Parsed request is a module
using description file: E:Demoes6package.json (relative path: .)

resolve as module
  E:\Demo\node_modules doesn't exist or is not a directory
  E:\node_modules doesn't exist or is not a directory
  looking for modules in E:\Demo\es6\node_modules
    using description file: E:\Demo\es6\package.json (relative path: ./node_modules)
      using description file: E:\Demo\es6\package.json (relative path: ./node_modules/babel)
        no extension
          E:\Demo\es6\node_modules\babel doesn't exist
        .js
          E:\Demo\es6\node_modules\babel.js doesn't exist
        .json
          E:\Demo\es6\node_modules\babel.json doesn't exist
        as directory
          E:\Demo\es6\node_modules\babel doesn't exist

[E:Demonode_modules]
[E:node_modules]
[E:Demoes6node_modulesbabel]
[E:Demoes6node_modulesbabel.js]
[E:Demoes6node_modulesbabel.json]
@ multi ./app/js/index.js index[0]
[21:16:05] Version: webpack 4.29.0
Built at: 2019-02-01 21:16:05
1 asset
Entrypoint index = index.js

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concep...

ERROR in multi ./app/js/index.js
Module not found: Error: Can't resolve 'babel' in 'E:Demoes6'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.

             You need to specify 'babel-loader' instead of 'babel',
             see https://webpack.js.org/migrate/3/#automatic-loader-module-name-extension-removed

@ multi ./app/js/index.js index[0]
[21:16:05] Finished 'scripts' after 931 ms
[21:16:05] Starting 'browser'...
[21:16:05] Starting 'serve'...
livereload[tiny-lr] listening on 35729 ...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文