简体   繁体   中英

Post-build Vue application in Visual Studio gives a “The command npm run build exited with code 1”

I am building a Vue app in visual studio and after running the build, I am left with the error: The command npm run build exited with code 1 . I noticed it happening in the Post-build of my Vue App with the following line of code:

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

this is my entire post build script:

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

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

I expect a package javascript file to be put in my 'dist' folder of the Vue app. Thank you for your help.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM