Skip to content
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

eggjs不支持pnpm #4627

Closed
ilyp opened this issue Mar 2, 2021 · 10 comments
Closed

eggjs不支持pnpm #4627

ilyp opened this issue Mar 2, 2021 · 10 comments

Comments

@ilyp
Copy link

ilyp commented Mar 2, 2021

What happens?

eggjs不支持pnpm

复现步骤,错误日志以及相关配置

  1. 使用pnpm安装依赖
  2. 启动后在加载plugin时报错:
    Error: Can not find plugin egg-onerror in "projectDir/node_modules, projectDir/node_modules/.pnpm/[email protected]/node_modules/egg/node_modules, projectDir/node_modules"

相关环境信息

  • 操作系统:macOS Big Sur 11.2.1
  • Node 版本:v14.16.0
  • Egg 版本:2.29.3
@egg-bot
Copy link

egg-bot commented Mar 2, 2021

Hello @ilyp. Please provide a reproducible example following the instruction.

Issues labeled by Need Reproduce will be closed if no activities in 7 days.


@ilyp,请根据这个说明提供最小可复现代码。

如果在 7 天内没有进展会被自动关闭。

@gemwuu
Copy link
Member

gemwuu commented Mar 3, 2021

L349,pnpm 子依赖没有 node_modules,这里需要额外支持下。

@gemwuu
Copy link
Member

gemwuu commented Mar 3, 2021

@ilyp 欢迎 PR。

@qingdengyue
Copy link
Contributor

感觉好复杂的样子。
https://pnpm.js.org/installation#compatibility
不同版本的pnpm对node版本的要求不一样,而且没有向下兼容,版本也挺多的。
image

@atian25 这种的有啥比较好的办法可以,走CI?

@fengmk2
Copy link
Member

fengmk2 commented Mar 19, 2021

@ilyp 你是 pnpm 那个版本?

@ilyp
Copy link
Author

ilyp commented Mar 23, 2021

@fengmk2
nodejs版本是12、14,pnpm 是 5

@fengmk2
Copy link
Member

fengmk2 commented Mar 26, 2021

@fengmk2
nodejs版本是12、14,pnpm 是 5

pnpm6 也是一样的问题吗?

@ilyp
Copy link
Author

ilyp commented Apr 2, 2021

@fengmk2 目前使用pnpm install --shamefully-hoist, 解决了插件不能加载的问题,可以运行项目。顺便我在本地运行了egg、egg-core的单元测试,发现 https://github.com/power-assert-js/intelli-espower-loader 这个包不支持pnpm。我改了一下 相关代码,就可以运行单元测试了。

@aidening
Copy link

aidening commented Aug 13, 2021

哈喽,我运行了这串代码,但是还是有同样的问题出现

@Riunshow
Copy link

Riunshow commented Dec 6, 2021

哈喽,我运行了这串代码,但是还是有同样的问题出现

pnpm 6.23.6
运行 pnpm install --shamefully-hoist 解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants