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

编译失败 #7556

Closed
ztfstar opened this issue Sep 8, 2020 · 5 comments
Closed

编译失败 #7556

ztfstar opened this issue Sep 8, 2020 · 5 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@ztfstar
Copy link

ztfstar commented Sep 8, 2020

相关平台

微信小程序

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

复现步骤

yarn dev:weapp 编译失败:
Error: Unknown option: .call$1. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
屏幕快照 2020-09-08 下午5 24 03

期望结果

成功编译

实际结果

Error: Unknown option: .call$1. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

环境信息

Taro v3.0.8


  Taro CLI 3.0.8 environment info:
    System:
      OS: macOS 10.14.5
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.18.3 - /usr/local/bin/node
      Yarn: 1.22.5 - /usr/local/bin/yarn
      npm: 6.14.8 - /usr/local/bin/npm
    npmPackages:
      @tarojs/taro: 3.0.8 => 1.3.35 
      @tarojs/taro-h5: ^3.0.8 => 1.3.35 
      babel-preset-taro: ^3.0.9 => 3.0.9 
      nerv-devtools: ^1.5.7 => 1.5.7 
      nervjs: ^1.5.7 => 1.5.7 
      react: ^16.13.1 => 16.13.1 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Sep 8, 2020
@suiyuex
Copy link

suiyuex commented Sep 8, 2020

@ztfstar 根据提示,是你app.config.js配置文件有问题,你可以查看一下,如果需要帮助请再次运行附带报错信息以及app.config.js文件内容

@ztfstar
Copy link
Author

ztfstar commented Sep 8, 2020

@suiyuex
屏幕快照 2020-09-08 下午6 18 17

大佬,app.config.js配置有问题吗

@suiyuex
Copy link

suiyuex commented Sep 8, 2020

@ztfstar 兄弟这是你环境的问题,你先试试把node_modules删除然后重新安装行不行,
如果不行,麻烦发一下package.json内容

@ztfstar
Copy link
Author

ztfstar commented Sep 9, 2020

{
"name": "library-miniprogram",
"version": "1.1.5",
"private": true,
"templateInfo": {
"name": "mobx",
"typescript": true,
"css": "sass"
},
"main": "index.js",
"scripts": {
"build:weapp": "taro build --type weapp",
"build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt",
"build:h5": "taro build --type h5",
"build:rn": "taro build --type rn",
"dev:weapp": "npm run build:weapp -- --watch",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch",
"dev:h5": "npm run build:h5 -- --watch",
"dev:rn": "npm run build:rn -- --watch"
},
"author": "",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.0.0",
"@babel/runtime": "^7.11.2",
"@tarojs/api": "^3.0.8",
"@tarojs/components": "3.0.8",
"@tarojs/extend": "^3.0.8",
"@tarojs/mini-runner": "3.0.8",
"@tarojs/mobx": "1.3.35",
"@tarojs/mobx-h5": "1.3.35",
"@tarojs/mobx-rn": "1.3.35",
"@tarojs/plugin-uglify": "^2.2.10",
"@tarojs/react": "^3.0.8",
"@tarojs/rn-runner": "1.3.35",
"@tarojs/router": "^3.0.8",
"@tarojs/runner-utils": "^3.0.8",
"@tarojs/runtime": "3.0.8",
"@tarojs/service": "^3.0.8",
"@tarojs/shared": "^3.0.8",
"@tarojs/taro": "3.0.8",
"@tarojs/taro-alipay": "1.3.35",
"@tarojs/taro-h5": "^3.0.8",
"@tarojs/taro-loader": "^3.0.8",
"@tarojs/taro-swan": "1.3.35",
"@tarojs/taro-tt": "1.3.35",
"@tarojs/taro-weapp": "1.3.35",
"@tarojs/taroize": "^3.0.8",
"@tarojs/with-weapp": "^3.0.8",
"@xmly/xlog-xmlite": "^1.0.0-rc.1",
"classnames": "^2.2.6",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-prettier": "^3.1.1",
"mobx": "4.8.0",
"mobx-react": "^6.1.4",
"nerv-devtools": "^1.5.7",
"nervjs": "^1.5.7",
"prettier": "^1.19.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"taro-listview": "^1.1.11",
"taro-ui": "^3.0.0-alpha.3"
},
"devDependencies": {
"@babel/core": "^7.11.5",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@tarojs/cli": "^3.0.8",
"@tarojs/plugin-babel": "1.3.35",
"@tarojs/plugin-csso": "1.3.35",
"@tarojs/plugin-sass": "^2.2.10",
"@tarojs/plugin-uglifyjs": "1.3.35",
"@tarojs/webpack-runner": "^3.0.8",
"@types/react": "16.3.14",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"babel-eslint": "^9.0.0",
"babel-plugin-transform-jsx-stylesheet": "^0.6.5",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-taro": "^3.0.9",
"dart-sass": "^1.25.0",
"eslint": "^5.16.0",
"eslint-config-taro": "3.0.8",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^1.6.1",
"eslint-plugin-taro": "3.0.8",
"husky": "^3.1.0",
"lint-staged": "^9.5.0",
"stylelint": "9.3.0",
"stylelint-config-taro-rn": "1.3.35",
"stylelint-taro-rn": "1.3.35",
"typescript": "^3.0.1"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,css,scss,json,md}": [
"prettier --write",
"git add"
]
}
}
@suiyuex 大佬 帮忙看一下有问题吗

@suiyuex
Copy link

suiyuex commented Sep 9, 2020

@ztfstar 根据你的报错信息,你的项目实在/Users/xmly/xxx,然后你的/Users/xmly目录下还有一个node_modules,具体问题就是@tarojs/mini-runner本身是有自己的依赖babel-loader使用的,根据报错信息引用的babel-loader是来自../node_modules也就是/Users/xmly/node_modules而非your project name/node_modules/@tarojs/mini-runner/node_modules/babel-loader,这些也只是根据你提供的报错信息的一些猜测,需要你自己去看一看!

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

3 participants