运行gulp --watch报错
[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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论