一个用gulp启动的项目,mac电脑不报错,windows报这个错,有人知道怎么改吗?
下面图里面的那个warning,mac也有但是可以正常启动;但是windows电脑不仅有warning,主要是报错了,由于报错无法启动,求指点。。。
D:\project\fe-emishu-h5>gulp
[17:30:27] Using gulpfile D:\project\fe-emishu-h5\gulpfile.js
[17:30:27] Starting 'default'...
[17:30:27] Starting 'build:development'...
[17:30:27] Starting 'clean'...
[17:30:27] Finished 'clean' after 12 ms
[17:30:27] Starting 'copy'...
[17:30:27] Finished 'copy' after 19 μs
[17:30:27] Starting 'html'...
[17:30:27] Starting 'css'...
[17:30:27] Starting 'migrate'...
[17:30:28] Finished 'css' after 58 ms
[17:30:28] Finished 'migrate' after 67 ms
[17:30:28] Finished 'html' after 171 ms
[17:30:28] Starting 'webpack:development'...
(node:26384) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
[17:30:29] gulp-notify: [Error running Gulp] ModuleBuildError:
Module build failed:
D:\project\fe-emishu-h5\node_modules\babel-preset-es2015:1
(function (exports, require, module, __filename, __dirname) { .npminstall/babel-preset-es2015/6.24.1/babel-preset-es2015
^
SyntaxError:
Unexpected token .
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at D:\project\fe-emishu-h5\node_modules\babel-core\lib\transformation\file\options\option-manager.js:296:17[17:30:29] Finished 'webpack:development' after 1.43 s
[17:30:29] Starting 'watch'...
[17:30:29] Finished 'watch' after 16 ms
[17:30:29] Finished 'build:development' after 1.8 s
[17:30:29] Starting 'server'...
[17:30:30] production server started on http://localhost:8019/
[17:30:31] Finished 'server' after 1.31 s
[17:30:31] Finished 'default' after 3.17 s
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
版本相关 升级版本就可以了
https://github.com/webpack/lo... 这个issues里面已经讨论过这个问题了
这个问题已经解决了,window上启动可能会报错(我当时node的版本是10.x),然后查了些资料 https://blog.csdn.net/wulala_...,将node版本降到6.x,
重新npm install 问题解决