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

Ant Pro 安装成功后,启动失败 🐛[BUG] #8132

Closed
benson-singapore opened this issue Feb 26, 2021 · 17 comments
Closed

Ant Pro 安装成功后,启动失败 🐛[BUG] #8132

benson-singapore opened this issue Feb 26, 2021 · 17 comments

Comments

@benson-singapore
Copy link

🐛 bug 描述

``

📷 复现步骤

╰ yarn start           
yarn run v1.16.0
$ cross-env UMI_ENV=dev umi dev
Starting the development server...

✖ Webpack
  Compiled with some errors in 1.28m

 ERROR  Failed to compile with 3 errors                                                                                                                                                        12:02:36 PM

These relative modules were not found:

* ../../../app in ./.umi/plugin-initial-state/models/initialState.ts
* ../global.less in ./.umi/umi.ts
* ../global.tsx in ./.umi/umi.ts

🏞 期望结果

💻 复现代码

© 版本信息

  • Ant Design Pro 版本: [e.g. 5.0.0]
  • umi 版本
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

@github-actions
Copy link

@zhengAnBin
Copy link

zhengAnBin commented Feb 26, 2021

me too,解决了吗?我安装了echarts-wordcloud之后umi在node_modules的包好像就丢失了。然后我就把整个node_modules删除重装。再启动的时候就出现和你一样的情况。app.tsx global.less global.tsx这些在我的src文件下是存在!没动过

@changpohouxue
Copy link

一样的~~~

@lxztrue
Copy link

lxztrue commented Feb 26, 2021

me too

@lxztrue
Copy link

lxztrue commented Feb 26, 2021

上午还高兴着,这咋就出问题了

@chenshuai2144
Copy link
Collaborator

@sorrycc 云谦老师看看,是不是 umi 发版本了

@zhoujh001
Copy link

一样的问题 手工修改.umi下的这三个地方的引用就能进入 但是重启又会重置掉了

@zhengAnBin
Copy link

一样的问题 手工修改.umi下的这三个地方的引用就能进入 但是重启又会重置掉了

怎么改能运行起来啊?暂时先跑起来再说

@zhoujh001
Copy link

zhoujh001 commented Feb 26, 2021

一样的问题 手工修改.umi下的这三个地方的引用就能进入 但是重启又会重置掉了

怎么改能运行起来啊?暂时先跑起来再说

  • ../../../app in ./.umi/plugin-initial-state/models/initialState.ts
  • ../global.less in ./.umi/umi.ts
  • ../global.tsx in ./.umi/umi.ts 这两个文件的三个地方加上src 改成 ../../../src/app ../src/global.less ../global.tsx 要运行后再改哦 一旦重新运行就又覆盖掉了

@wavesbig
Copy link

me too

@xiaodin1
Copy link

我也遇到这个问题了~

@zhengAnBin
Copy link

一样的问题 手工修改.umi下的这三个地方的引用就能进入 但是重启又会重置掉了

怎么改能运行起来啊?暂时先跑起来再说

  • ../../../app in ./.umi/plugin-initial-state/models/initialState.ts
  • ../global.less in ./.umi/umi.ts
  • ../global.tsx in ./.umi/umi.ts 这两个文件的三个地方加上src 改成 ../../../src/app ../src/global.less ../global.tsx 要运行后再改哦 一旦重新运行就又覆盖掉了

好了跑起来了,修改项目根目录下的.umi文件。而不是src下的.umi文件
谢谢啦

@quicklearning123
Copy link

为啥生成了两.umi文件夹。。根目录一个,src下一个

@zhengAnBin
Copy link

我看了我以前的项目。根目录下是没有这个.umi文件。
这个问题估计就是框架读取了根目录的.umi所以出现了路径错误

@chenshuai2144
Copy link
Collaborator

可以先删除dumi 的依赖。

@umijs/preset-dumi 这个依赖删除一下试试

@zhengAnBin
Copy link

npm uninstall @umijs/preset-dumi 可以解决

@chenshuai2144
Copy link
Collaborator

fix in [email protected]

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

No branches or pull requests

9 participants