Closed maxiong1 closed 3 months ago
@maxiong1 直接执行 pnpm install
试试
pnpm install 没执行成功,可以检查 node 版本、pnpm版本是否与项目要求一致
目前的错误上看,是pnpm install没执行成功,提供下 pnpm install 日志看看
目前的错误上看,是pnpm install没执行成功,提供下 pnpm install 日志看看
这样可以吗
.../node_modules/vue-demi postinstall$ node -e "try{require('./scripts/postinstall.js')}catch(e){}"
.../node_modules/vue-demi postinstall: Done
devDependencies:
+ @changesets/changelog-github 0.5.0
+ @changesets/cli 2.27.7
+ @ls-lint/ls-lint 2.2.3
+ @types/jsdom 21.1.7
+ @types/node 22.2.0
+ @vben/commitlint-config 5.0.1 <- internal\lint-configs\commitlint-config
+ @vben/eslint-config 5.0.0 <- internal\lint-configs\eslint-config
+ @vben/prettier-config 5.0.0 <- internal\lint-configs\prettier-config
+ @vben/stylelint-config 5.0.1 <- internal\lint-configs\stylelint-config
+ @vben/tailwind-config 5.0.1 <- internal\tailwind-config
+ @vben/tsconfig 5.0.1 <- internal\tsconfig
+ @vben/turbo-run 5.0.1 <- scripts\turbo-run
+ @vben/vite-config 5.0.1 <- internal\vite-config
+ @vben/vsh 5.0.1 <- scripts\vsh
+ @vue/test-utils 2.4.6
+ autoprefixer 10.4.20
+ cross-env 7.0.3
+ cspell 8.13.2
+ husky 9.1.4
+ is-ci 3.0.1
+ jsdom 24.1.1
+ lint-staged 15.2.8
+ rimraf 6.0.1
+ tailwindcss 3.4.9
+ turbo 2.0.12
+ typescript 5.5.4
+ unbuild 2.0.0
+ vite 5.4.0
+ vitest 2.0.5
+ vue-tsc 2.0.29
. postinstall$ turbo run stub
. postinstall: Failed
ELIFECYCLE Command failed with exit code 3221225506.
@maxiong1 可以 这时候你再执行 pnpm dev
试试
@maxiong1 可以 这时候你再执行
pnpm dev
试试
试了,还是出现
> turbo-run dev
node:internal/modules/esm/resolve:264
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'E:\vue-vben-admin-main\scripts\turbo-run\dist\index.mjs' imported from E:\vue-vben-admin-main\scripts\turbo-run\bin\turbo-run.mjs
at finalizeResolution (node:internal/modules/esm/resolve:264:11)
at moduleResolve (node:internal/modules/esm/resolve:917:10)
at defaultResolve (node:internal/modules/esm/resolve:1130:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleLoader.import (node:internal/modules/esm/loader:328:34)
at importModuleDynamically (node:internal/modules/esm/translators:158:35)
at importModuleDynamicallyCallback (node:internal/modules/esm/utils:207:14)
at file:///E:/vue-vben-admin-main/scripts/turbo-run/bin/turbo-run.mjs:3:1 {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///E:/vue-vben-admin-main/scripts/turbo-run/dist/index.mjs'
}
看后面 执行 postinstall:turbo run stub
postinstall:Failed
,是不是还有部分依赖没安装成功? turbo我也全局安装了
postinstall: Failed
没有执行成功, 你试试再次 pnpm install
你用的shell工具是 powershell吗,不是的话换这个试试
一跑起来就是奇奇怪怪的错啊
一跑起来就是奇奇怪怪的错啊
这个看起来是你本地host文件配置问题
一跑起来就是奇奇怪怪的错啊
代理关了试试
nodejs的版本, 安装node20.16.0, 不要装22+的版本, pnpm会报错的
我也遇到这个问题,找了一天资料了,都没解决 w
Version
Vben Admin V5
Describe the bug?
v5.0.0 v5.0.1 这两个版本执行pnpm dev、pnpm dev:antd、pnpm reinstall 都报错
node:internal/modules/esm/resolve:264 throw new ERR_MODULE_NOT_FOUND( ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'E:\vben3-admin\v5.0.1\scripts\turbo-run\dist\index.mjs' imported from E:\vben3-admin\v5.0.1\scripts\turbo-run\bin\turbo-run.mjs at finalizeResolution (node:internal/modules/esm/resolve:264:11) at moduleResolve (node:internal/modules/esm/resolve:917:10) at defaultResolve (node:internal/modules/esm/resolve:1130:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38) at ModuleLoader.import (node:internal/modules/esm/loader:328:34) at importModuleDynamically (node:internal/modules/esm/translators:158:35) at importModuleDynamicallyCallback (node:internal/modules/esm/utils:207:14) at file:///E:/vben3-admin/v5.0.1/scripts/turbo-run/bin/turbo-run.mjs:3:1 { code: 'ERR_MODULE_NOT_FOUND', url: 'file:///E:/vben3-admin/v5.0.1/scripts/turbo-run/dist/index.mjs' }
Node.js v20.11.1
node:internal/modules/esm/resolve:264 throw new ERR_MODULE_NOT_FOUND( ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'E:\vben3-admin\v5.0.1\scripts\vsh\dist\index.mjs' imported from E:\vben3-admin\v5.0.1\scripts\vsh\bin\vsh.mjs at finalizeResolution (node:internal/modules/esm/resolve:264:11) at moduleResolve (node:internal/modules/esm/resolve:917:10) at defaultResolve (node:internal/modules/esm/resolve:1130:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38) at ModuleLoader.import (node:internal/modules/esm/loader:328:34) at importModuleDynamically (node:internal/modules/esm/translators:158:35) at importModuleDynamicallyCallback (node:internal/modules/esm/utils:207:14) at file:///E:/vben3-admin/v5.0.1/scripts/vsh/bin/vsh.mjs:3:1 { code: 'ERR_MODULE_NOT_FOUND', url: 'file:///E:/vben3-admin/v5.0.1/scripts/vsh/dist/index.mjs' }
Node.js v20.11.1
Reproduction
https://github.com/vbenjs/vue-vben-admin (main分支)
System Info
Relevant log output
No response
Validations