转自: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'

组件概念弄混了。。。

相关文章:

  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2022-01-15
  • 2021-09-05
  • 2021-09-09
猜你喜欢
  • 2021-09-07
  • 2021-10-18
  • 2022-01-09
  • 2022-01-07
  • 2021-07-25
  • 2021-08-29
  • 2021-07-15
相关资源
相似解决方案