nuxt: Nuxt Error: Server resources are not available!

Version

v2.0.0

Reproduction link

[http://i`m afraid i cant provide a link.](http://im afraid i can`t provide a link.)

Steps to reproduce

Build the project and copy specified files to separate directory (or a production server) and starting server locally,then an error throw.At the same time ,the local version works fine.

What is expected ?

when i use the cmd npm run start,the project should work fine.

What is actually happening?

but, a nuxt error occured.

<div align="right">This bug report is available on Nuxt community (#c8639)</div>

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 45 (13 by maintainers)

Most upvoted comments

You may have used git to copy buildDir files For example, build .nuxt locally, push to the server So you should open .gitignore Find dist Change to # dist or /dist Because it causes the .nuxt/dist folder to be ignored

For clarification, the improvement is not fixing a known bug. Only better DX and more error info in case of problems.

Version: node: v11.10.0 npm: 6.7.0 nuxt: ^2.4.0

Problem happened: https://github.com/nuxt/nuxt.js/blob/43709fda1572f37583d2f74b8b62ec379ed07e93/packages/vue-renderer/src/renderer.js#L418

Because of the NODE_ENV equal to production, then the this.context.options.dev is false and the retries is greater than 0. i dont know the detail and what Server resources are not available is. The only thing i guess is something unexpected happened when calculates the retries.

Hope it’s helpful.

@angryeuan @Crazymuyang create-nuxt-app has been released with the fix.

@angryeuan this is no proper way of fixing the issue though 🙈

Correct, but it lets me progress with my work and meet my deadline. I’d imagine others are in a similar situation.

@Crazymuyang how come are you still using Windows OS on 2019?

I had this and I’ve solved it by bumping nuxt from 2.3 to 2.4 and changing npm scripts from nuxt to nuxt-ts binary (because I’m using a TS template).

BTW mind that buildDir option doesn’t work and it always build the app into .nuxt directory. 💩