简体   繁体   English

pnpm 不解决依赖关系

[英]pnpm does not resolve dependencies

I have my package.json file and if I'm installing all dependencies with npm i - everything is ok, but if I'm using pnpm i I have exception TypeError: Cannot read property 'uid' of undefined.我有我的 package.json 文件,如果我使用npm i安装所有依赖项 - 一切正常,但如果我使用pnpm i我有异常类型TypeError: Cannot read property 'uid' of undefined. I do not use this library, I tried to install it manually but with pnpm i uid it does not work, only with npm i uid我不使用这个库,我尝试手动安装它但是使用pnpm i uid它不起作用,只能使用npm i uid

Use the shamefully-hoist flag set to true .使用shamefully-hoist标志设置为true

pnpm i --shamefully-hoist=true

Or simply have this file on the same level as your package.json或者只是将此文件与您的 package.json 放在同一级别

/.npmrc /.npmrc

shamefully-hoist=true

shamefully-hoist docs . shamefully-hoist文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM