Closed weiTimes closed 4 years ago
CC @luckyadam
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
报错信息已经贴上,其中有两个地方,第一个是一直提示The code generator has deoptimised the styling of /Users/yewei/Project/banmatou/taro-lottery/node_modules/react-reconciler/cjs/react-reconciler.development.js as it exceeds the max of 500KB
; 还有就是在编译到index.scss时报TypeError: __webpack_require__(...) is not a function
,是不是升级到taron next后还需要配置loader呢?
希望可以帮忙尽快看一下,比较急,弄了快一天了。
你的依赖没有装 @tarojs/mini-runner 吗
{
"name": "taro-find",
"version": "1.0.0",
"private": true,
"description": "发现",
"templateInfo": {
"name": "redux",
"typescript": false,
"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",
"dev:weapp": "npm run build:weapp -- --watch",
"start": "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/runtime-corejs2": "^7.0.0",
"@tarojs/async-await": "2.0.6",
"@tarojs/components": "^3.0.0-beta.1",
"@tarojs/mini-runner": "^3.0.0-beta.1", // **在这里**
"@tarojs/react": "^3.0.0-beta.1",
"@tarojs/redux": "2.0.6",
"@tarojs/redux-h5": "2.0.6",
"@tarojs/router": "2.0.6",
"@tarojs/runtime": "^3.0.0-beta.1",
"@tarojs/taro": "^3.0.0-beta.1",
"@tarojs/taro-alipay": "2.0.6",
"@tarojs/taro-h5": "2.0.6",
"@tarojs/taro-swan": "2.0.6",
"@tarojs/taro-tt": "2.0.6",
"@tarojs/taro-weapp": "2.0.6",
"dva-core": "^2.0.0",
"dva-loading": "^3.0.15",
"moment": "^2.24.0",
"mp-colorui": "^0.5.10",
"nerv-devtools": "^1.5.6",
"nervjs": "^1.5.6",
"query-string": "^6.8.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"taro-listview": "^1.1.11",
"taro-ui": "^2.2.4",
"utilscore": "^0.0.45"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/plugin-transform-typescript": "^7.9.4",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.9.0",
"@babel/preset-react": "^7.9.4",
"@babel/preset-typescript": "^7.9.0",
"@tarojs/plugin-babel": "2.0.6",
"@tarojs/plugin-csso": "2.0.6",
"@tarojs/plugin-sass": "2.0.6",
"@tarojs/plugin-uglifyjs": "2.0.6",
"@tarojs/webpack-runner": "2.0.6",
"@types/react": "^16.4.8",
"@types/webpack-env": "^1.13.6",
"babel-eslint": "^9.0.0",
"babel-plugin-transform-jsx-stylesheet": "^0.6.5",
"eslint": "^5.16.0",
"eslint-config-taro": "2.0.6",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^1.6.1",
"eslint-plugin-taro": "2.0.6",
"js-base64": "^2.5.1",
"stylelint": "9.3.0",
"stylelint-config-taro-rn": "2.0.6",
"stylelint-taro-rn": "2.0.6",
"taro-cropper": "^1.1.0",
"webpack": "^4.42.1",
"webpack-bundle-analyzer": "^3.6.0"
}
}
安装在 dependencies中
应该是 mp-colorui 还没有适配 taro next
我等会先把mp-colorui移除了试试,一直提示这个The code generator has deoptimised the styling of /Users/yewei/Project/banmatou/taro-lottery/node_modules/react-reconciler/cjs/react-reconciler.development.js as it exceeds the max of 500KB
和这是一个问题吗
移除了mp-colorui 后,taro-cropper也报这个错了,不会第三方库都有问题吧,我感觉是不是scss解析的问题,这里都是解析到scss文件报错。
因为 taro-cropper 也没有适配 taro next,scss 也是一个问题,按理来说 scss 文件不应该放在 dist 里,即便你解决了 scss 问题,这些包没有适配也是编译不了的
这样啊,那算是白忙活了,看来这个项目是没法升级到next了
Hello~
您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。
如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。
Good luck and happy coding~
同问
这应该是taro-ui版本要升级到3x以上,taro-ui2x和taro next不兼容
问题描述
正在从Taro2.0升级至Taro next,babel已升级至babel7,执行
npm run start
后报错,没有通过编译。复现步骤
期望行为
希望可以编译通过
报错信息
系统信息
补充信息