react
启动时报这个错误,有人遇到过吗?
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
折腾半天还是没解决,意外发现控制台npm start
不会报错,但点WebStorm的右上角的运行按钮启动就报错,有点搞啊what'up!
这俩还能有差异?
配置参数错了。