Nuxt dist folder

Hi there, when deploying nuxt all works ok to a point however the JS files all return 404’s. On generation the following error is flagged:

“Warning: The following file/directory path referenced in your XDN router configuration does not exist: dist/_nuxt. Requests matching this route will return a 404 status.”

I’m not using a custom server framework and have followed the instructions as to how to add to an existing nuxt project.

Any. assistance would be appreciated.

Can you post your routes.js file? I am curious as I do not have that dist/_nuxt directory when I generate a Nuxt project.

The routes.js file is the default generated one. So it just has the match for the service worker. The dist folder for SSR is generated under .nuxt in production I believe. Does it work out the box for you ? Only actions I’ve taken are to run the CDN init and add the xdn nuxt module to buildmodule in the nuxt config.

Can you post your nuxt.config.js here please as well as the link to your site?

After a little digging, we found that you overrode the NODE_ENV environment variable in your environment configuration. This is causing nuxtRoutes to improperly route browser assets. Removing this environment variable should fix the issue.

After talking internally, we’ve decided that a better implementation would be for NuxtRoutes to use a private environment variable for this logic that cannot be changed by the user. This has been filed as an issue.

Awesome. Thanks for looking in to this Mark.