I’ve started getting to grips with the new ASP.NET 5 project system and during the course of this process I came across a compilation error “The 'prepack' script failed with status code 99”. It was a pretty easy fix which I’ve detailed below.
The entire error I was handed back by the compilation system was as follows:
1>------ Build started: Project: ExampleProject, Configuration: Debug Any CPU ------ 1> C:\Users\exampleUser\.dnx\runtimes\dnx-clr-win-x18.104.22.168-beta4\bin\dnx.exe --appbase "C:\Users\exampleUser\Documents\GitHub\ExampleProject\src\ExampleProject" "C:\Users\exampleUser\.dnx\runtimes\dnx-clr-win-x22.214.171.124-beta4\bin\lib\Microsoft.Framework.PackageManager\Microsoft.Framework.PackageManager.dll" pack "C:\Users\exampleUser\Documents\GitHub\ExampleProject\src\ExampleProject" --configuration Debug --out "..\..\artifacts\bin\ExampleProject" 1> grunt-cli: The grunt command line interface. (v0.1.13) 1> The 'prepack' script failed with status code 99. ========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
The fix is pretty simple. It just means that the grunt-cli package is not installed in your project. You just need to initiate a package restore to get it back on its feet.
If you’re a command line person then you can type this in your project folder:
Most of the time though its a lot simpler to stay in the safe nest of Visual Studio and you can initiate a package restore by following these steps:
- Go to the
- Look in the
srcfolder then in the name of your project then in
- Right click on the
NPMnode and choose
- Wait patiently while it sorts out its packages.
If you’re bored while waiting or just curious to see what its up to you can watch the progress by taking these steps:
Outputwindow (either docked somewhere at the bottom of your screen or in
- In the drop down at the top labelled
Show output from:select
Package Manager Log
When its finished it will notify you by updating the status bar at the bottom with “
Installing packages complete”. You should now be one-step closer to your working project!