Meituan-Dianping / mpvue

基于 Vue.js 的小程序开发框架,从底层支持 Vue.js 语法和构建工具体系。
http://mpvue.com
MIT License
20.42k stars 2.07k forks source link

mpvue项目在iOS9上面报如下截图错图 #1036

Closed SuHeran closed 6 years ago

SuHeran commented 6 years ago

Page[pages/index/main] not found. May be caused by: 1.forgot to add page route in app.json. 2.Invoking Page{} in async task.

thirdScriptError sdk uncaught third error SyntaxError line:16045,column:0,SynataxError:Unexpected keyword 'const'. Const declarations are not supported in strict mode. Stack:

详情如图 http://thyrsi.com/t6/372/1537334369x-1566679485.png

项目在上线一个多月后发现在的,仅仅在iOS9有这个问题

lichenabson commented 6 years ago

es6报错, 是不是用什么库了

SuHeran commented 6 years ago

@lichenabson 收到的反馈只有iOS9才有这个问题,目前用到的所有插件和库如下

"dependencies": { "mpvue": "^1.0.11", "mpvue-wxparse": "^0.6.5", "vuex": "^3.0.1" }, "devDependencies": { "babel-core": "^6.22.1", "babel-eslint": "^8.2.3", "babel-loader": "^7.1.1", "babel-plugin-transform-runtime": "^6.22.0", "babel-preset-env": "^1.3.2", "babel-preset-stage-2": "^6.22.0", "babel-register": "^6.22.0", "chalk": "^2.4.0", "connect-history-api-fallback": "^1.3.0", "copy-webpack-plugin": "^4.5.1", "crypto-js": "^3.1.9-1", "css-loader": "^0.28.11", "cssnano": "^3.10.0", "eslint": "^4.19.1", "eslint-config-standard": "^11.0.0", "eslint-friendly-formatter": "^4.0.1", "eslint-loader": "^2.0.0", "eslint-plugin-html": "^4.0.3", "eslint-plugin-import": "^2.11.0", "eslint-plugin-node": "^6.0.1", "eslint-plugin-promise": "^3.4.0", "eslint-plugin-standard": "^3.0.1", "eventsource-polyfill": "^0.9.6", "express": "^4.16.3", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^1.1.11", "friendly-errors-webpack-plugin": "^1.7.0", "glob": "^7.1.2", "html-webpack-plugin": "^3.2.0", "http-proxy-middleware": "^0.18.0", "mpvue-loader": "^1.1.2", "mpvue-template-compiler": "^1.0.11", "mpvue-webpack-target": "^1.0.0", "node-sass": "^4.9.3", "optimize-css-assets-webpack-plugin": "^3.2.0", "ora": "^2.0.0", "portfinder": "^1.0.13", "postcss-loader": "^2.1.4", "postcss-mpvue-wxss": "^1.0.0", "prettier": "~1.12.1", "relative": "^3.0.2", "rimraf": "^2.6.0", "sass-loader": "^7.1.0", "sass-resources-loader": "^1.3.3", "semver": "^5.3.0", "shelljs": "^0.8.1", "uglifyjs-webpack-plugin": "^1.2.5", "url-loader": "^1.0.1", "vue-style-loader": "^4.1.0", "webpack": "^3.11.0", "webpack-bundle-analyzer": "^2.2.1", "webpack-dev-middleware-hard-disk": "^1.12.0", "webpack-merge": "^4.1.0", "webpack-mpvue-asset-plugin": "^0.1.0-rc.1" }

lichenabson commented 6 years ago

@SuHeran 处理一下mpvue-wxparse这个库 用babel处理一下

lichenabson commented 6 years ago

{ test: /\.js$/, include: [resolve('src'), resolve('test'), /mpvue-wxparse/], use: [ 'babel-loader', { loader: 'mpvue-loader', options: { checkMPEntry: true } }, ] }, @SuHeran 大概这个样子

SuHeran commented 6 years ago

@lichenabson 十分感谢,之前也想到这方面了,就是没写对

SuHeran commented 6 years ago

问题已解决,非常感谢,手动比心

prozwang commented 5 years ago

@lichenabson

同样遇到这个问题,但是没找到哪个库报错 "dependencies": { "buffer": "5.0.8", "flyio": "0.5.5", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.0.8", "lodash.isnil": "^4.0.0", "mpvue": "2.0.5", "vuex": "2.5.0", "webpack-mpvue-vendor-plugin": "2.0.0" }, "devDependencies": { "babel-cli": "^6.22.0", "babel-core": "^6.22.1", "babel-eslint": "^7.1.1", "babel-loader": "^7.1.1", "babel-plugin-transform-runtime": "^6.22.0", "babel-preset-env": "^1.3.2", "babel-preset-es2015": "^6.22.0", "babel-preset-stage-2": "^6.22.0", "babel-register": "^6.22.0", "chalk": "^2.0.1", "connect-history-api-fallback": "^1.3.0", "copy-webpack-plugin": "^4.0.1", "cross-env": "^5.1.4", "css-loader": "^0.28.0", "cssnano": "^3.10.0", "eslint": "^3.19.0", "eslint-config-standard": "^6.2.1", "eslint-friendly-formatter": "^3.0.0", "eslint-loader": "^1.7.1", "eslint-plugin-html": "^3.0.0", "eslint-plugin-promise": "^3.4.0", "eslint-plugin-standard": "^2.0.1", "eventsource-polyfill": "^0.9.6", "express": "^4.14.1", "extract-text-webpack-plugin": "^2.0.0", "file-loader": "^0.11.1", "friendly-errors-webpack-plugin": "^1.1.3", "fs-extra": "^6.0.0", "glob": "^7.1.2", "html-webpack-plugin": "^2.28.0", "http-proxy-middleware": "^0.17.3", "moment": "^2.22.2", "mpvue-loader": "2.0.0", "mpvue-template-compiler": "2.0.5", "mpvue-webpack-target": "^1.0.0", "optimize-css-assets-webpack-plugin": "^2.0.0", "ora": "^1.2.0", "portfinder": "^1.0.13", "postcss-loader": "^2.0.6", "postcss-mpvue-wxss": "^1.0.0", "prettier": "1.12.1", "px2rpx-loader": "^0.1.8", "relative": "^3.0.2", "rimraf": "^2.6.0", "semver": "^5.3.0", "shelljs": "^0.7.6", "uglifyjs-webpack-plugin": "^1.2.4", "url-loader": "^0.5.8", "vue-style-loader": "^3.0.1", "webpack": "^2.7.0", "webpack-bundle-analyzer": "^2.2.1", "webpack-dev-middleware-hard-disk": "^1.10.1", "webpack-merge": "^4.1.0", "webpack-mpvue-asset-plugin": "2.0.0" }, "engines": { "node": ">= 4.0.0", "npm": ">= 3.0.0" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ]