代码:
node node_modules/esbuild/install.js
这个
这条命令在哪运行?网站根目录 运行node node_modules/esbuild/install.js 然后再运行 yarn dev yarn build?
我输入过node node_modules/esbuild/install.js 这条命令 。运行yarn build 依然出错
import { performance } from 'node
erf_hooks'
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1176:20)
at Module._compile (node:internal/modules/cjs/loader:1218:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
Node.js v18.16.0
error Command failed with exit code 1.
info Visit
https://yarnpkg.com/en/docs/cli/run for documentation about this command.