npm run build报错了,老师帮看下什么问题吧
过程是一步步按照视频走的。
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.