1
votes

For good measure, I delete the "dist" folder before running yarn generate.

As expected, Nuxt generates a build and puts the files in the "dist" folder. What's not expected, is that it creates a "node_modules" folder INSIDE of "dist/_nuxt" and puts the commons.js file inside of dist/_nuxt/node_modules.

When I run yarn start everything works as expected. The problem arises when I commit "dist" to Git. The project's .gitignore file excludes "node_modules" and consequently the commons.js file does not get pushed to the repository. I can fix this by editing the .gitignore file but I am concerned there is something else going on and that feels like a hack.

enter image description here

1

1 Answers

1
votes

There appears to be a bug in version 2.14.1 of Nuxt which was released Aug 4, 2020. Resolved the issue by reverting to v2.14.0.