I’m building and deploying a Vuejs app and I’m able to build this locally and setup a separate site within Netlify to just upload the builds manually, but I’d really like the automated builds to work. It seems to be ignoring my babel settings to drop the console log lines. I’m getting a bunch of error Unexpected console statement no-console errors in the deploy logs.
I tried adding the options but that didn’t resolve the issue. I think the options are for excluding certain types of logs that you want to keep in the files (e.g. errors and warnings).
Is there a way to determine if the netlify build environment has access to all the things that my local build environment has? Maybe its just not taking my babel.config.js into consideration during build?
Hiya, I wanted to see if you were still experiencing this or had found a fix? @Dennis and I suggested in another thread moving your dev dependencies to be production dependencies so they’ll definitely be available during build.
@divya also had some suggestions in the other thread you linked:
Want to check out the repo she links there and/or try the dependencies suggestion, and let us know how it goes?
I tried moving the babel remove console package to prod dependencies but it didn’t work. I’ve noticed that sometimes when I build locally it will fail with the same console errors. But I just run “npm run build” again and it will work. So there’s definitely something strange going on with the build. For now I’m just working on a small side project on my own so having the CI working isn’t a big deal. I’m just building locally and uploading the /dist folder to Netlify manually which is working for me just fine for now.
I’ll keep my eye on this thread in case someone figures it out though. Thanks!
Seems likely that if the build fails locally and rerunning it works, that would lead to consistent failures here - since we don’t re-run in the old copy of the build but in a totally fresh checkout without any artifacts available from previous runs.
I’d be working to troubleshoot the local build so it completes reliably, before trying to debug here - since the failure in our CI seems like an “expected” failure in my opinion, based on your local behavior.
@some no i haven’t really tried to resolve it yet since I have a workaround for now. But it would be really nice to be able to use Netlify’s build preview feature which doesn’t work with manual uploads.