|
升级过程问题多多,升级后出现报错。
这个是我的 package.json 的依赖:
- "devDependencies": {
- "babel-cli": "^6.10.1",
- "babel-core": "^6.26.0",
- "babel-eslint": "^8.2.1",
- "babel-loader": "^8.0.5",
- "babel-plugin-syntax-jsx": "^6.18.0",
- "cross-env": "^5.1.4",
- "css-what": "^2.1.0",
- "hap-toolkit": "0.4.3",
- "less": "^3.8.1",
- "less-loader": "^4.1.0"
- },
复制代码 这个是调试窗口的错误:
- {"fileName":"undefined","pageName":"PageList","functionName":"createPage","remarks":"PageList\/index.js","line":1029,"startColumn":0,"endColumn":1,"jsMessage":"Error: Module build failed (from .\/node_modules\/babel-loader\/lib\/index.js):\nError: ENOENT: no such file or directory, open '\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/.babelrc'\n at Object.openSync (fs.js:438:3)\n at Object.readFileSync (fs.js:343:35)\n at ConfigChainBuilder.addConfig (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/options\/build-config-chain.js:146:32)\n at ConfigChainBuilder.findConfigs (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/options\/build-config-chain.js:96:16)\n at buildConfigChain (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/options\/build-config-chain.js:61:13)\n at OptionManager.init (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/options\/option-manager.js:354:58)\n at File.initOptions (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/index.js:212:65)\n at new File (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/index.js:135:24)\n at Pipeline.transform (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/pipeline.js:46:16)\n at transpile (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-loader\/lib\/index.js:50:20)","stackTrace":"Error: Module build failed (from .\/node_modules\/babel-loader\/lib\/index.js):\nError: ENOENT: no such file or directory, open '\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/.babelrc'\n at Object.openSync (fs.js:438:3)\n at Object.readFileSync (fs.js:343:35)\n at ConfigChainBuilder.addConfig (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/options\/build-config-chain.js:146:32)\n at ConfigChainBuilder.findConfigs (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/options\/build-config-chain.js:96:16)\n at buildConfigChain (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/options\/build-config-chain.js:61:13)\n at OptionManager.init (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/options\/option-manager.js:354:58)\n at File.initOptions (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/index.js:212:65)\n at new File (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/file\/index.js:135:24)\n at Pipeline.transform (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-core\/lib\/transformation\/pipeline.js:46:16)\n at transpile (\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/babel-loader\/lib\/index.js:50:20)\n at Object..\/node_modules\/@hap-toolkit\/dsl-xvm\/lib\/loader\/script-loader.js!.\/node_modules\/@hap-toolkit\/dsl-xvm\/lib\/loader\/module-loader.js!.\/node_modules\/babel-loader\/lib\/index.js?cwd=\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP&plugins[]=\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/node_modules\/@hap-toolkit\/dsl-xvm\/lib\/loader\/babel-plugin-jsx.js&comments=false!.\/node_modules\/@hap-toolkit\/dsl-xvm\/lib\/loader\/fragment-loader.js?index=0&type=script!.\/src\/components\/TitleBar.ux?uxType=comp (eval at Ln (native.js:3:178), <anonymous>:1029:7)\n at __webpack_require__ (eval at Ln (native.js:3:178), <anonymous>:25:30)\n at Object..\/node_modules\/@hap-toolkit\/dsl-xvm\/lib\/loader\/ux-loader.js?cwd=\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP&type=import!.\/src\/components\/TitleBar.ux?uxType=comp&name=title-bar (eval at Ln (native.js:3:178), <anonymous>:1064:20)\n at __webpack_require__ (eval at Ln (native.js:3:178), <anonymous>:25:30)\n at Object..\/src\/PageList\/index.ux?uxType=page (eval at Ln (native.js:3:178), <anonymous>:1131:1)\n at __webpack_require__ (eval at Ln (native.js:3:178), <anonymous>:25:30)\n at .\/node_modules\/@hap-toolkit\/dsl-xvm\/lib\/loader\/json-loader.js!.\/node_modules\/@hap-toolkit\/dsl-xvm\/lib\/loader\/style-loader.js?index=0&type=style!.\/node_modules\/@hap-toolkit\/dsl-xvm\/lib\/loader\/fragment-loader.js?index=0&type=style!.\/src\/components\/qapp\/qui-button\/index.ux?uxType=comp.module.exports..qui-button-box.width (eval at Ln (native.js:3:178), <anonymous>:89:18)\n at createPageHandler (eval at Ln (native.js:3:178), <anonymous>:92:10)\n at eval (eval at Ln (native.js:3:178), <anonymous>:1155:12)\n at eval (eval at Ln (native.js:3:178), <anonymous>:1160:3)","className":"com.eclipsesource.v8.V8ScriptExecutionException","jsScript":"throw new Error("Module build failed (from .\/node_modules\/babel-loader\/lib\/index.js):\\nError: ENOENT: no such file or directory, open '\/Users\/mazhaokeng\/project-orvibo\/Oppo-IoT-QuickAPP\/.babelrc'\\n "}
复制代码 请问要怎么解决?
|
|