Umi: 从windows迁移到mac后,npm i 以后.umi文件夹的router.js文件创建React对象路径错误

Created on 25 Mar 2019  ·  10Comments  ·  Source: umijs/umi

What happens?


从windows迁移到mac后,npm i 以后,npm start ,.umi文件夹的router.js文件创建React对象路径错误,导致缺少模块,请问如何改变.umi文件夹中的设置,使项目能够进行迁移

最小可复现仓库

请使用 yarn create umi 创建,并上传到你的 GitHub 仓库

复现步骤,错误日志以及相关配置


相关环境信息

  • Umi 版本
  • Node 版本
  • 操作系统

Most helpful comment

配置里面应该使用相对路径

  { path: '/', component: './login/index' },

All 10 comments

Umi 版本:2.0.0-0
Node 版本:8.14
操作系统:mac 13.6

删掉 .umi 文件夹,重新运行 npm run start

试过了,生成后还是原来的目录

可以发一下出问题的代码吗?

image

image

给个最小重现用例吧

配置里面应该使用相对路径

  { path: '/', component: './login/index' },

搞定,万分感谢

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ironyfive picture ironyfive  ·  3Comments

sorrycc picture sorrycc  ·  4Comments

tangzhengwen picture tangzhengwen  ·  4Comments

zhanchengkun picture zhanchengkun  ·  3Comments

y2891663091 picture y2891663091  ·  4Comments