在Visual Studio 2015中导入App.Vue时出现Vue Js 2错误

时间:2017-12-12 22:46:38

标签: javascript visual-studio-2015 vue.js vuejs2

我是Vue JS的新手,我在Visual Studio 2015中创建了一个新项目。我没有在网上找到任何教程,可以让你了解Vue js如何在Visual Studio 2015中与asp.net MVC一起工作。我按照Vue的所有步骤进行操作。我正在使用web pack简单模板。所有命令都是根据他们的官方网站。

npm install -g vue-cli

使用“webpack”模板

创建了一个新项目
vue init webpack my-project

安装依赖项并转到!

cd my-project

npm install

它确实为我创造了一切。但当我运行它时,它在控制台

给我一​​个错误的调试模式
Unexpected token {
   at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\vue-loader\index.js:1:80)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at loadLoader (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\loader-runner\lib\loadLoader.js:13:17)
    at iteratePitchingLoaders (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
    at runLoaders (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\loader-runner\lib\LoaderRunner.js:362:2)
    at NormalModule.doBuild (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModule.js:182:3)
    at NormalModule.build (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModule.js:275:15)
    at Compilation.buildModule (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\Compilation.js:151:10)
    at factoryCallback (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\Compilation.js:344:12)
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModuleFactory.js:241:5
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModuleFactory.js:94:13
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\tapable\lib\Tapable.js:268:11
    at NormalModuleFactory.<anonymous> (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\tapable\lib\Tapable.js:272:13)
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModuleFactory.js:69:10
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModuleFactory.js:194:7
    at nextTickCallbackWith0Args (node.js:452:9)
    at process._tickCallback (node.js:381:13)
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\vue-loader\index.js:1:80)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at loadLoader (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\loader-runner\lib\loadLoader.js:13:17)
    at iteratePitchingLoaders (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
    at runLoaders (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\loader-runner\lib\LoaderRunner.js:362:2)
    at NormalModule.doBuild (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModule.js:182:3)
    at NormalModule.build (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModule.js:275:15)
    at Compilation.buildModule (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\Compilation.js:151:10)
    at factoryCallback (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\Compilation.js:344:12)
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModuleFactory.js:241:5
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModuleFactory.js:94:13
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\tapable\lib\Tapable.js:268:11
    at NormalModuleFactory.<anonymous> (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\tapable\lib\Tapable.js:272:13)
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModuleFactory.js:69:10
    at c:\users\*******************\documents\visual studio 2015\Projects\VueProject\VueProject\node_modules\webpack\lib\NormalModuleFactory.js:194:7
    at nextTickCallbackWith0Args (node.js:452:9)
    at process._tickCallback (node.js:381:13)
    at Object.<anonymous> (http://localhost:1457/dist/build.js:6:34888)
    at t (http://localhost:1457/dist/build.js:1:101)
    at Object.<anonymous> (http://localhost:1457/dist/build.js:1:718)
    at t (http://localhost:1457/dist/build.js:1:101)
    at http://localhost:1457/dist/build.js:1:457
    at http://localhost:1457/dist/build.js:1:466

0 个答案:

没有答案