錯誤 組件編譯 組件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