Closed zouchengli closed 1 year ago
解决了,用14版本 ❯ npm run build
chat-new@0.0.0 build /Users/chengli.zou/GolandProjects/chatgpt-web/chat-new tsc && vite build --mode prod
vite v4.2.1 building for prod... ✓ 246 modules transformed. dist/index.html 0.45 kB dist/assets/index-6b2d2dee.css 0.05 kB │ gzip: 0.07 kB dist/assets/index-7d01d5e6.css 0.07 kB │ gzip: 0.08 kB dist/assets/index-76b3b3f6.css 0.63 kB │ gzip: 0.41 kB dist/assets/style-55fb6ecf.css 147.62 kB │ gzip: 36.48 kB dist/assets/index-12c86fa0.js 1.35 kB │ gzip: 0.73 kB dist/assets/web-vitals-60d3425a.js 4.31 kB │ gzip: 1.68 kB dist/assets/style-c6e89906.js 185.35 kB │ gzip: 66.92 kB dist/assets/index-1358201a.js 218.74 kB │ gzip: 73.42 kB dist/assets/index-556a0162.js 304.99 kB │ gzip: 106.09 kB ✓ built in 1.80s ❯ node -v v14.21.3v
❯ node -v v12.22.12 ❯ npm run build ❯ npm run build
file:///Users/chengli.zou/GolandProjects/chatgpt-web/chat-new/node_modules/vite/bin/vite.js:7 await import('source-map-support').then((r) => r.default.install()) ^^^^^
SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18) at async link (internal/modules/esm/module_job.js:42:21) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! chat-new@0.0.0 build:
tsc && vite build --mode prod
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the chat-new@0.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /Users/chengli.zou/.npm/_logs/2023-04-06T07_09_57_848Z-debug.log