micro-zoe / micro-app

A simple, efficient and powerful micro front-end framework. 一款简约、高效、功能强大的微前端框架
https://micro-zoe.github.io/micro-app/
MIT License
5.62k stars 571 forks source link

mian-react16初始化报错 #7

Closed linqiqi077 closed 3 years ago

linqiqi077 commented 3 years ago

Module not found: Error: Can't resolve '@micro-zoe/micro-app' in 'C:\Users\Administrator\Desktop\micro-app\examples\main-react16\src error in ./src/layouts/BasicLayout.jsx

Module not found: Error: Can't resolve '@micro-zoe/micro-app' in 'C:\Users\Administrator\Desktop\micro-app\examples\main-react16\src\layouts'

error in ./src/pages/angular11/angular11.js

Module not found: Error: Can't resolve '@micro-zoe/micro-app/polyfill/jsx-custom-event' in 'C:\Users\Administrator\Desktop\micro-app\examples\main-react16\src\pages\angular11'

error in ./src/pages/multiple/multiple.js

Module not found: Error: Can't resolve '@micro-zoe/micro-app/polyfill/jsx-custom-event' in 'C:\Users\Administrator\Desktop\micro-app\examples\main-react16\src\pages\multiple'

error in ./src/pages/react16/react16.js ...

bailicangdu commented 3 years ago

你用什么命令启动的?

linqiqi077 commented 3 years ago

你用什么命令启动的?

yarn bootstrap yarn start 这样启动可以启动一部分,但是主应用没启动起来,只能单独访问子应用

后来直接进去main-react16目录下启动yarn dev,报了上述错误

bailicangdu commented 3 years ago

这个原因是因为没有microapp本地文件,运行yarn build:watch就可以了

linqiqi077 commented 3 years ago

这个原因是因为没有microapp本地文件,运行yarn build:watch就可以了

昨天使用windiws环境进行操作报的错误,今天换成wsl倒是好了。是否没在win环境跑过?

bailicangdu commented 3 years ago

试过,没问题