1

I would like to run nuxt generate in development mode. Everything I've tried still runs as production. What I need: To disable webpack/minify processing of source so I can see where actual errors are occurring.

Nuxt Generate forces to production mode. I have a console error that shows up with generate, but not on local dev. The console error is useless since the backtrace shows everything as line 2 of a huge file...

Console error backtrace

I've tried several things to get generate in production mode including trying set the environment in nuxt.config.js and on cli:

NODE_ENV=development npx nuxt generate

I can't find any reference to this particular need. Any solutions?

(I have since figured out that it's a YouTube subscription object in the footer which I've removed for now, but it'd be nice to see the code and be able to track the issue more easily.)

Rich Clingman
  • 106
  • 1
  • 8
  • This may help: https://github.com/nuxt/framework/discussions/1011#discussioncomment-1482615 You could otherwise try this one: https://github.com/nuxt/framework/discussions?discussions_q=sourcemap At the end, the error is telling you that you're using some browser specific thing while Nuxt runs your code on the server too (isomorphic), hence why `appendChild` on `Node`. You can always use a solution like this: https://stackoverflow.com/a/67751550/8816585 – kissu Aug 24 '22 at 19:00
  • Thank you. I've added the tag around the YouTube object. That remedies this particular case. I still want (*need*) to be able to see the stack trace after a generate when I have weird issues. I'll watch that discussion and search on "sourcemap". I'm using Nuxt 2 for now. – Rich Clingman Aug 24 '22 at 21:17

0 Answers0