-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pnpm dev 启动 egg 时 ts 报错 #4867
Labels
Comments
感觉又是 pnpm 子依赖提升到平级导致插件的 typings 找不到。。。 @whxaxes 瞅瞅 |
本来是打算用 pnpm workspaces 做 monorepo 的,遇到以上问题; |-- server // eggjs
|-- packages // shared packages
|-- package.json
|-- yarnrc.yml package.json ...
"workspaces": [
"packages/*",
"server"
],
... yarnrc.yml yarnPath: .yarn/releases/yarn-3.1.1.cjs
nodeLinker: "node-modules"
enableGlobalCache: true 复现
报错Error: egg is not found in /Users/xxx/CodeSpace/yyy/zzz-repo/server/node_modules
at assertAndReturn (/Users/xxx/CodeSpace/yyy/zzz-repo/node_modules/egg-utils/lib/framework.js:66:9)
at Object.getFrameworkPath (/Users/xxx/CodeSpace/yyy/zzz-repo/node_modules/egg-utils/lib/framework.js:49:10)
at DevCommand.formatArgs (/Users/xxx/CodeSpace/yyy/zzz-repo/node_modules/egg-bin/lib/cmd/dev.js:91:28)
at formatArgs.next (<anonymous>)
at onFulfilled (/Users/xxx/CodeSpace/yyy/zzz-repo/node_modules/co/index.js:65:19)
at /Users/xxx/CodeSpace/yyy/zzz-repo/node_modules/co/index.js:54:5
at new Promise (<anonymous>)
at co (/Users/xxx/CodeSpace/yyy/zzz-repo/node_modules/co/index.js:50:10)
at toPromise (/Users/xxx/CodeSpace/yyy/zzz-repo/node_modules/co/index.js:118:63)
at next (/Users/xxx/CodeSpace/yyy/zzz-repo/node_modules/co/index.js:99:29) 其中报错的文件 建议是否不要直接用 |
@whxaxes 我用 pnpm 也遇到了这个问题,现在有进展吗 |
可能跟 eggjs/egg-core#238 有关,不过这个 PR 暂时回滚了,等我们修复完内部的几个 Bug 后,再继续发布。 |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happens?
pnpm dev 启动 egg 时 ts 报错
How To Reproduce
报错截图
The text was updated successfully, but these errors were encountered: