app.js文件中的路由设置
config = {
//路由文件,小程序会将路由文件中的元素看作是页面
pages: [
‘pages/test/test’,
‘pages/index/index’,
],
window: {
backgroundTextStyle: ‘light’,
navigationBarBackgroundColor: ‘#fff’,
navigationBarTitleText: ‘WeChat’,
navigationBarTextStyle: ‘black’
}
}
运行h5端没问题
运行weapp,报错。
错误 组件编译 组件node_modules/@tarojs/components/dist/index.js编译失败!
Error: ENOENT: no such file or directory, open 'F:\TaroProject\myApp\node_modules@tarojs\components\dist@tarojs\taro-h5’
谁能帮忙看看,或者说入口页不单单在路由这里设置,还要在其他地方设置,小程序才能成功编译