We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微信小程序
https://github.com/i-coder-robot/taro3WeappVue.git 小程序基础库: 2.14.1 使用框架: Vue 2
taro init xxx,选择vue,初始化结束后,进入项目目录,运行yarn dev:weapp,报错
运行成功
抛错
👽 Taro v3.0.18 Taro CLI 3.0.18 environment info: System: OS: macOS 10.15.4 Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.14.0 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.8 - /usr/local/bin/npm
The text was updated successfully, but these errors were encountered:
默认初始化运行不了。
node-sass 也有问题, 需要执行 npm rebuild node-sass
npm rebuild node-sass
然后遇到这个:
node:internal/modules/cjs/loader:919 const err = new Error(message); ^ Error: Cannot find module '../build/Release/canvas.node'
Sorry, something went wrong.
@fangmd 看了下 taro-ui-vue 被引用的是 src 下的源码,Typescript 写的。而你建的是非 TS 的工程,所以编译报错。你可以把 babel.config.js 中,taro preset 的 typescript 选项置为 true 即可,taro 会帮你加上 babel 解析 typescript 的 plugin。
// babel-preset-taro 更多选项和默认值: // https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md module.exports = { presets: [ ['taro', { framework: 'vue', ts: true }] ] }
node-sass 的问题自行解决吧,非 taro 问题。
No branches or pull requests
相关平台
微信小程序
复现仓库
https://github.com/i-coder-robot/taro3WeappVue.git
小程序基础库: 2.14.1
使用框架: Vue 2
复现步骤
taro init xxx,选择vue,初始化结束后,进入项目目录,运行yarn dev:weapp,报错
期望结果
运行成功
实际结果
抛错
环境信息
The text was updated successfully, but these errors were encountered: