Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js Webpack Babel-模块生成失败:类型错误:无法读取属性';绑定';努尔的_Vue.js_Webpack_Babeljs - Fatal编程技术网

Vue.js Webpack Babel-模块生成失败:类型错误:无法读取属性';绑定';努尔的

Vue.js Webpack Babel-模块生成失败:类型错误:无法读取属性';绑定';努尔的,vue.js,webpack,babeljs,Vue.js,Webpack,Babeljs,我正在VUEJS 2中构建一个新项目,遇到了一个问题。我对webpack相当陌生,所以我会边学边用。你能告诉我为什么这段代码会抛出错误吗 ./store/modules/user/store.js 然后,当它被编译时,webpack会抛出以下错误: ERROR Failed to compile with 1 errors 14:21:50 erro

我正在VUEJS 2中构建一个新项目,遇到了一个问题。我对webpack相当陌生,所以我会边学边用。你能告诉我为什么这段代码会抛出错误吗

./store/modules/user/store.js

然后,当它被编译时,webpack会抛出以下错误:

ERROR  Failed to compile with 1 errors                                                                         14:21:50
 error  in ./assets/js/store/modules/user/store.js

Module build failed: TypeError: Cannot read property 'bindings' of null
    at Scope.moveBindingTo (c:\myProject\node_modules\@babel\traverse\lib\scope\index.js:978:13)
    at BlockScoping.updateScopeInfo (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:364:17)
    at BlockScoping.run (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:330:12)
    at PluginPass.BlockStatementSwitchStatementProgram (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:70:24)
    at newFn (c:\myProject\node_modules\@babel\traverse\lib\visitors.js:237:21)
    at NodePath._call (c:\myProject\node_modules\@babel\traverse\lib\path\context.js:65:20)
    at NodePath.call (c:\myProject\node_modules\@babel\traverse\lib\path\context.js:40:17)
    at NodePath.visit (c:\myProject\node_modules\@babel\traverse\lib\path\context.js:100:12)
    at TraversalContext.visitQueue (c:\myProject\node_modules\@babel\traverse\lib\context.js:142:16)
    at TraversalContext.visitSingle (c:\myProject\node_modules\@babel\traverse\lib\context.js:102:19)
    at TraversalContext.visit (c:\myProject\node_modules\@babel\traverse\lib\context.js:182:19)
    at Function.traverse.node (c:\myProject\node_modules\@babel\traverse\lib\index.js:106:17)
    at traverse (c:\myProject\node_modules\@babel\traverse\lib\index.js:76:12)
    at transformFile (c:\myProject\node_modules\@babel\core\lib\transformation\index.js:116:29)
    at runSync (c:\myProject\node_modules\@babel\core\lib\transformation\index.js:45:3)
    at runAsync (c:\myProject\node_modules\@babel\core\lib\transformation\index.js:35:14)
    at process.nextTick (c:\myProject\node_modules\@babel\core\lib\transform.js:34:34)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

 @ ./assets/js/store/store.js 3:0-40
 @ ./assets/js/main.js
这是我的package.json

我想我错过了某种巴别塔的延伸。我做了一些研究,认为这可能与es2015在“store.js”文件中没有被理解有关。你知道我能做些什么来解决这个问题吗?我还注意到我没有一个.babelrc文件,有什么我需要放进去的,这样才能工作吗


谢谢你的帮助

我只是通过恢复反应来修复它-native@0.55.4目前,我还面临使用(react)的错误-native@0.56)@巴别塔/核心7.0.0-测试版

ERROR  Failed to compile with 1 errors                                                                         14:21:50
 error  in ./assets/js/store/modules/user/store.js

Module build failed: TypeError: Cannot read property 'bindings' of null
    at Scope.moveBindingTo (c:\myProject\node_modules\@babel\traverse\lib\scope\index.js:978:13)
    at BlockScoping.updateScopeInfo (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:364:17)
    at BlockScoping.run (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:330:12)
    at PluginPass.BlockStatementSwitchStatementProgram (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:70:24)
    at newFn (c:\myProject\node_modules\@babel\traverse\lib\visitors.js:237:21)
    at NodePath._call (c:\myProject\node_modules\@babel\traverse\lib\path\context.js:65:20)
    at NodePath.call (c:\myProject\node_modules\@babel\traverse\lib\path\context.js:40:17)
    at NodePath.visit (c:\myProject\node_modules\@babel\traverse\lib\path\context.js:100:12)
    at TraversalContext.visitQueue (c:\myProject\node_modules\@babel\traverse\lib\context.js:142:16)
    at TraversalContext.visitSingle (c:\myProject\node_modules\@babel\traverse\lib\context.js:102:19)
    at TraversalContext.visit (c:\myProject\node_modules\@babel\traverse\lib\context.js:182:19)
    at Function.traverse.node (c:\myProject\node_modules\@babel\traverse\lib\index.js:106:17)
    at traverse (c:\myProject\node_modules\@babel\traverse\lib\index.js:76:12)
    at transformFile (c:\myProject\node_modules\@babel\core\lib\transformation\index.js:116:29)
    at runSync (c:\myProject\node_modules\@babel\core\lib\transformation\index.js:45:3)
    at runAsync (c:\myProject\node_modules\@babel\core\lib\transformation\index.js:35:14)
    at process.nextTick (c:\myProject\node_modules\@babel\core\lib\transform.js:34:34)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

 @ ./assets/js/store/store.js 3:0-40
 @ ./assets/js/main.js
{
    "devDependencies": {
        "@symfony/webpack-encore": "^0.17.0",
        "@vue/cli-plugin-babel": "^3.0.0-rc.3",
        "@vue/test-utils": "^1.0.0-beta.20",
        "babel-core": "^7.0.0-bridge.0",
        "babel-jest": "^23.2.0",
        "node-sass": "^4.9.0",
        "sass-loader": "^7.0.3",
        "vue-loader": "^14.1.1",
        "vue-template-compiler": "^2.5.16"
    },
    "license": "UNLICENSED",
    "private": true,
    "scripts": {
        "dev-server": "encore dev-server",
        "dev": "encore dev",
        "watch": "encore dev --watch",
        "build": "encore production"
    },
    "dependencies": {
        "@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.51",
        "@coreui/coreui": "^2.0.3",
        "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
        "@coreui/icons": "0.2.0",
        "@coreui/vue": "^2.0.0-rc.0",
        "axios": "^0.18.0",
        "bootstrap": "^4.1.1",
        "bootstrap-vue": "^2.0.0-rc.11",
        "chart.js": "^2.7.2",
        "core-js": "^2.5.7",
        "css-vars-ponyfill": "^1.7.2",
        "flag-icon-css": "^3.0.0",
        "font-awesome": "^4.7.0",
        "jquery": "^3.3.1",
        "npm": "^6.4.0",
        "perfect-scrollbar": "^1.4.0",
        "simple-line-icons": "^2.4.1",
        "sweetalert2": "^7.26.11",
        "vue": "^2.5.16",
        "vue-chartjs": "^3.3.2",
        "vue-perfect-scrollbar": "^0.1.0",
        "vue-router": "^3.0.1",
        "vue-table-component": "^2.0.0-alpha.1",
        "vue-tables": "^1.6.44",
        "vuetable": "^1.5.12",
        "vuex": "^3.0.1"
    }
}