简体   繁体   English

React-native yarn workspaces/wml 不加载包含已安装包的导入模块

[英]React-native yarn workspaces/wml don't load imported modules that contains an installed package

I tried to implement react-native with workspaces to share the business logic across mobile and web application, it works well on the web, but it doesn't work or even load files on react-native.我尝试使用工作区实现 react-native 以跨移动和 web 应用程序共享业务逻辑,它在 web 上运行良好,但它不起作用,甚至无法在 react-native 上加载文件。 I ended up using wml but it cannot load a file from the shared package that's importing packages like axios or so.., although these packages are already installed there, and it works as expected on web.我最终使用了 wml,但它无法从共享包中加载文件,该共享包正在导入诸如 axios 之类的包......,尽管这些包已经安装在那里,并且它在 web 上按预期工作。

I fixed it by using lerna instead of yarn workSpaces / wml我通过使用lerna而不是 yarn workSpaces / wml 来修复它

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

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