初始化后运行报错

来源:3-7 初始化 Next.js 项目并配置基础开发依赖

夹块布

2023-05-28

这是什么原因?
SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.dev (D:\Projects_mini\chatGPT\ai_assistant\node_modules\next\dist\lib\commands.js:15:30)
at Object. (D:\Projects_mini\chatGPT\ai_assistant\node_modules\next\dist\bin\next:150:28)
at Module._compile (internal/modules/cjs/loader.js:778:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ai_assistant@0.1.0 dev: next dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ai_assistant@0.1.0 dev 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! C:\Users\jiakuaibu\AppData\Roaming\npm-cache_logs\2023-05-28T02_46_18_628Z-debug.log

写回答

1回答

夹块布

提问者

2023-05-28

已解决,Node.js 版本问题。打扰了

1
1
逆天而行Gavin
用哪个版本是对的?
2023-07-30
共1条回复

AI大语言模型 ChatGPT从0到1打造私人智能英语学习助手

详解大语言模型原理、发展历史、工程实践全链路实战3个项目

778 学习 · 69 问题

查看课程