React Native PNPM模块依赖项未链接到node_modules文件夹

z31licg0  于 2023-04-22  发布在  React
关注(0)|答案(1)|浏览(218)

@react-native-community/cli模块的依赖项没有链接到node_module文件夹。
我尝试使用React native创建一个pnpm monorepo,但@react-native-community/cli的依赖项没有链接到node_module文件夹。以下是@react-native-community/cli模块依赖项:
"dependencies": { "@react-native-community/cli-clean": "11.2.0", "@react-native-community/cli-config": "11.2.0", "@react-native-community/cli-debugger-ui": "11.2.0", "@react-native-community/cli-doctor": "11.2.0", "@react-native-community/cli-hermes": "11.2.0", "@react-native-community/cli-plugin-metro": "11.2.0", "@react-native-community/cli-server-api": "11.2.0", "@react-native-community/cli-tools": "11.2.0", "@react-native-community/cli-types": "11.2.0", "chalk": "^4.1.2", "commander": "^9.4.1", "execa": "^5.0.0", "find-up": "^4.1.0", "fs-extra": "^8.1.0", "graceful-fs": "^4.1.3", "prompts": "^2.4.0", "semver": "^6.3.0" },
它们都在node_modules文件夹中丢失。
我在.npmrc配置文件中尝试了shamefully-hoist=true,但没有帮助。

vcudknz3

vcudknz31#

如果需要提升,请在工作区的根目录下创建一个.npmrc文件,内容如下:

node-linker=hoisted

shamefully-hoist也可以工作,但据我所知,react native目前不支持符号链接。

相关问题