【问题标题】:Post-build Vue application in Visual Studio gives a "The command npm run build exited with code 1"Visual Studio 中的构建后 Vue 应用程序给出“命令 npm run build exited with code 1”
【发布时间】:2019-09-05 01:06:06
【问题描述】:

我正在 Visual Studio 中构建一个 Vue 应用程序,运行构建后,我得到了错误:The command npm run build exited with code 1。我注意到它发生在我的 Vue 应用程序的后期构建中,代码行如下:

<Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)"/>

这是我的整个后期构建脚本:

<PropertyGroup>
<PostBuildEventDependsOn></PostBuildEventDependsOn>
</PropertyGroup>
<Target
  Name="PostBuildEvent"
  Condition="'$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')"
  DependsOnTargets="$(PostBuildEventDependsOn)">

<Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)"/>

我希望将一个包 javascript 文件放在我的 Vue 应用程序的“dist”文件夹中。谢谢您的帮助。

【问题讨论】:

    标签: javascript html vue.js webpack vuejs2


    【解决方案1】:

    只需以管理员身份运行 VS。

    【讨论】:

      猜你喜欢
      • 2021-05-15
      • 2022-07-06
      • 1970-01-01
      • 2019-09-25
      • 1970-01-01
      • 2019-04-06
      • 1970-01-01
      • 2019-04-27
      • 1970-01-01
      相关资源
      最近更新 更多