Skip to content
New issue

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

yarn build:weapp 打包失败 #8025

Closed
ctcx opened this issue Nov 11, 2020 · 0 comments
Closed

yarn build:weapp 打包失败 #8025

ctcx opened this issue Nov 11, 2020 · 0 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@ctcx
Copy link

ctcx commented Nov 11, 2020

相关平台

微信小程序

小程序基础库: 2.0.4
使用框架: React

复现步骤

打包失败

期望结果

生成小程序相关文件

实际结果

yarn build:weapp
yarn run v1.22.4
$ taro build --type weapp
👽 Taro v3.0.15

生成 工具配置 /Users/caitong/Documents/Work/project/lock.wu/miniapp/dist/project.config.json
node:internal/modules/cjs/loader:1142
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: The module '/Users/caitong/node_modules/canvas/build/Release/canvas.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 67. This version of Node.js requires
NODE_MODULE_VERSION 88. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1142:18)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Module.require (node:internal/modules/cjs/loader:972:19)
at require (node:internal/modules/cjs/helpers:88:18)
at Object. (/Users/caitong/node_modules/canvas/lib/bindings.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
at Module._compile (/Users/caitong/Documents/Work/project/lock.wu/miniapp/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
at Object.newLoader [as .js] (/Users/caitong/Documents/Work/project/lock.wu/miniapp/node_modules/pirates/lib/index.js:104:7)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Module.require (node:internal/modules/cjs/loader:972:19)
at require (node:internal/modules/cjs/helpers:88:18)
at Object. (/Users/caitong/node_modules/canvas/lib/canvas.js:9:18)
at Module._compile (node:internal/modules/cjs/loader:1083:30) {
code: 'ERR_DLOPEN_FAILED'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

环境信息

👽 Taro v3.0.15


  Taro CLI 3.0.15 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 15.0.1 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 7.0.3 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.0.15 => 3.0.15 
      @tarojs/components: 3.0.15 => 3.0.15 
      @tarojs/mini-runner: 3.0.15 => 3.0.15 
      @tarojs/react: 3.0.15 => 3.0.15 
      @tarojs/runtime: 3.0.15 => 3.0.15 
      @tarojs/taro: 3.0.15 => 3.0.15 
      @tarojs/webpack-runner: 3.0.15 => 3.0.15 
      babel-preset-taro: 3.0.15 => 3.0.15 
      eslint-config-taro: 3.0.15 => 3.0.15 
      react: ^16.10.0 => 16.14.0 
      taro-ui: ^3.0.0-alpha.3 => 3.0.0-alpha.3 
    npmGlobalPackages:
      typescript: 3.1.5
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Nov 11, 2020
@ctcx ctcx closed this as completed Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

1 participant