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

typescript version bug #5042

Closed
xgqfrms-GitHub opened this issue Dec 9, 2019 · 14 comments
Closed

typescript version bug #5042

xgqfrms-GitHub opened this issue Dec 9, 2019 · 14 comments
Assignees

Comments

@xgqfrms-GitHub
Copy link

xgqfrms-GitHub commented Dec 9, 2019

typescript version bug

image

dev build error

image

@taro-bot
Copy link

taro-bot bot commented Dec 9, 2019

CC @Littly

@taro-bot
Copy link

taro-bot bot commented Dec 9, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Garfield550
Copy link
Collaborator

报错是配置文件里的 Copy 字段写的有问题

@xgqfrms-GitHub
Copy link
Author

@Garfield550 It's a new project without make any change, what should I do?

@Garfield550
Copy link
Collaborator

delete copy property on config/index.js

const config = {
  copy: { // delete this
    patterns: [],
  },
};

@xgqfrms-GitHub
Copy link
Author

still error

image

@xgqfrms-GitHub
Copy link
Author

what's .temp ?

@xgqfrms-GitHub
Copy link
Author

xgqfrms-GitHub commented Dec 10, 2019

that's really bad developer experience

only the most simple demo can run(no ts, no redux, no scss), still need manually modify the config file!

image

@xgqfrms-GitHub
Copy link
Author

why import not exist module?

{
  "name": "xcxApp",
  "version": "1.0.0",
  "private": true,
  "description": "xcx-app h5",
  "templateInfo": {
    "name": "redux",
    "typescript": true,
    "css": "sass"
  },
  "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",
    "build:qq": "taro build --type qq",
    "build:quickapp": "taro build --type quickapp",
    "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",
    "dev:qq": "npm run build:qq -- --watch",
    "dev:quickapp": "npm run build:quickapp -- --watch"
  },
  "author": "",
  "license": "MIT",
  "dependencies": {
    "@tarojs/async-await": "1.3.27",
    "@tarojs/components": "1.3.27",
    "@tarojs/components-qa": "1.3.27",
    "@tarojs/router": "1.3.27",
    "@tarojs/taro": "1.3.27",
    "@tarojs/taro-alipay": "1.3.27",
    "@tarojs/taro-h5": "1.3.27",
    "@tarojs/taro-qq": "1.3.27",
    "@tarojs/taro-quickapp": "1.3.27",
    "@tarojs/taro-swan": "1.3.27",
    "@tarojs/taro-tt": "1.3.27",
    "@tarojs/taro-weapp": "1.3.27",
    "nervjs": "^1.5.5",
    "nerv-devtools": "^1.5.5",
    "redux": "^4.0.0",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "@types/react": "^16.4.8",
    "@types/webpack-env": "^1.13.6",
    "@tarojs/plugin-babel": "1.3.27",
    "@tarojs/plugin-csso": "1.3.27",
    "@tarojs/plugin-sass": "1.3.27",
    "@tarojs/plugin-uglifyjs": "1.3.27",
    "@tarojs/webpack-runner": "1.3.27",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-transform-jsx-stylesheet": "^0.6.5",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babel-eslint": "^8.2.3",
    "eslint": "^5.16.0",
    "eslint-config-taro": "1.3.27",
    "eslint-plugin-react": "^7.8.2",
    "eslint-plugin-react-hooks": "^1.6.1",
    "eslint-plugin-import": "^2.12.0",
    "stylelint": "9.3.0",
    "stylelint-config-taro-rn": "1.3.27",
    "stylelint-taro-rn": "1.3.27",
    "eslint-plugin-taro": "1.3.27",
    "@typescript-eslint/parser": "^1.6.0",
    "typescript": "^3.0.1"
  }
}

very confused code

image

image

@Garfield550
Copy link
Collaborator

Sorry.

Config file has a bug, we fixed today.

We supported TypeScript, please re-init a new project and answer the question "? 是否需要使用 TypeScript ?" as "Yes".

@xgqfrms-GitHub
Copy link
Author

image

@Garfield550
Copy link
Collaborator

Missing @tarojs/redux-h5 should be a template bug, we will fix later.

@xgqfrms-GitHub
Copy link
Author

solution

just following below steps

  1. comment out ./config/index.js 's copy object

image

  1. you have to manually install yarn add @tarojs/redux-h5 (if using Redux)

image

@Garfield550
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants