错误 组件编译 组件node_modules/@tarojs/components/dist/index.js编译失败!


转自:https://taro-ui.jd.com/#/docs/questions

{ Error: ENOENT: no such file or directory, open 'D:\xiaochengxu\node_modules\@tarojs\components\dist\@tarojs\taro-h5'

运行代码的时候提示报错,找到官方文档提示

//请在 config/index.js 文件中添加如下配置项:

h5: {
  esnextModules: ['taro-ui']
}

但是还是未解决。。查看文档发现

//在 Taro 文件中引入组件

import { AtGrid } from "taro-ui"

我自己的

import { View, Text,AtGrid   } from '@tarojs/components'

组件概念弄混了。。。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM