慕尼黑8108885
2021-01-05 22:23
过程是一步步按照视频走的。
hanyanshuo@hanyanshuodeMacBook-Pro learnTodoList $ npm run build
> learntodolist@1.0.0 build /Users/hanyanshuo/Desktop/learnTodoList
> webpack --config webpack.config.js
/Users/hanyanshuo/Desktop/learnTodoList/node_modules/webpack-cli/lib/webpack-cli.js:625
const globalOptions = program.helpInformation().match(/Options:\n(?<globalOptions>.+)\nCommands:\n/s);
^
SyntaxError: Invalid regular expression flags
at NativeCompileCache._moduleCompile (/Users/hanyanshuo/Desktop/learnTodoList/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/Users/hanyanshuo/Desktop/learnTodoList/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (/Users/hanyanshuo/Desktop/learnTodoList/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/Users/hanyanshuo/Desktop/learnTodoList/node_modules/webpack-cli/lib/bootstrap.js:1:82)
at Module._compile (/Users/hanyanshuo/Desktop/learnTodoList/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! learntodolist@1.0.0 build: `webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the learntodolist@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
webpack-cli版本兼容问题吧,先卸载webpack-cli,换其他版本的webpack-cli试试
看这个提示好像是正则表达式出问题了?
Vue+Webpack打造todo应用
84606 学习 · 787 问题
相似问题
回答 1
回答 2
回答 1
回答 2
回答 3