taro 使用taro-ui时报错,Cannot find module ‘./style/index.scss‘

taro-ui官网:

Taro UI | O2Team

出现这个问题,说明你安装taro-ui时是按照官网的步骤,然后引入文件就出现这个报错了。之所以会报错,因为taro和taro-ui的版本不兼容。

解决方法:

重新安装taro的alpha版本,安装完成如果还是报错,就重启项目。如果还是还是不行,删除依赖重新cnpm i。

cnpm install [email protected] -S

猜你喜欢

转载自blog.csdn.net/qq_42740797/article/details/124847942