Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version fails to switch to production #127

Open
sksallaj82 opened this issue Apr 19, 2019 · 1 comment
Open

Latest version fails to switch to production #127

sksallaj82 opened this issue Apr 19, 2019 · 1 comment

Comments

@sksallaj82
Copy link

I been using previous versions to this update and switching to production has no problem. However, with the latest build I had last night, I ran into issues where I can't switch to production no matter what I do. It runs all the prod scripts, hides modules, etc. But when I run it, it says:

vue.js:9057   You are running Vue in development mode.
              Make sure to turn on production mode when deploying for production.
              See more tips at https://vuejs.org/guide/deployment.html
client.js:92  [HMR] connected

In the google console.

And when I deploy to IIS, it gives me a server side error:

One or more errors occurred. (Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'

I'm not sure why it still thinks I'm on dev no matter what I do.

I even created this bat file:

call xcopy /Y "%~dp0appsettings.Production.json" "%~dp0appsettings.json"
call rmdir /S /Q "%~dp0wwwroot"
call setx ASPNETCORE_ENVIRONMENT "Production" /M
call npm run build
:End
PAUSE

And it ran well. All the scripts executed successfully, but I still get the same errors. If I run other projects that I had based on this repo, I didn't run into these issues.

@MarkPieszak
Copy link
Member

How are you running your publish script?

Maybe there's something in here that could help make sure it's using the correct json file?

dotnet/aspnetcore#5169

That's strange that Prod builds aren't running correctly in the master branch - nothing for that was changed hmmm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants