请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

执行yarn create @vitejs/app manager-fe报错

yan_jack@192 project % yarn create @vitejs/app manager-fe
yarn create v1.22.19
[1/4] 🔍 Resolving packages…
warning @vitejs/create-app@2.5.2: @vitejs/create-app has been moved to create-vite, please use ‘npm create vite@latest’ or ‘yarn create vite’ instead
[2/4] 🚚 Fetching packages…
[3/4] 🔗 Linking dependencies…
[4/4] 🔨 Building fresh packages…
success Installed “@vitejs/create-app@2.5.2” with binaries:
- create-app
- cva

@vitejs/create-app is deprecated, use yarn create vite instead

/Users/yan_jack/.config/yarn/global/node_modules/@vitejs/create-app/index.js:43
require(‘create-vite’)
^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/yan_jack/.config/yarn/global/node_modules/create-vite/index.js from /Users/yan_jack/.config/yarn/global/node_modules/@vitejs/create-app/index.js not supported.
Instead change the require of /Users/yan_jack/.config/yarn/global/node_modules/create-vite/index.js in /Users/yan_jack/.config/yarn/global/node_modules/@vitejs/create-app/index.js to a dynamic import() which is available in all CommonJS modules.
at Object. (/Users/yan_jack/.config/yarn/global/node_modules/@vitejs/create-app/index.js:43:1) {
code: ‘ERR_REQUIRE_ESM’
}
error Command failed.
Exit code: 1
Command: /Users/yan_jack/.yarn/bin/create-app
Arguments: manager-fe
Directory: /Users/yan_jack/Desktop/project
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

正在回答 回答被采纳积分+3

1回答

河畔一角 2022-10-19 08:49:51

是不是弄错了,创建命令是:yarn create vite demo吧

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信