nuxt: Nuxt Error: Server resources are not available!
Version
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)
You may have used git to copy
buildDirfiles For example, build.nuxtlocally, push to the server So you should open.gitignoreFinddistChange to# distor/distBecause it causes the.nuxt/distfolder to be ignoredFor 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.devis false and the retries is greater than 0. i dont know the detail and whatServer resources are not availableis. The only thing i guess is something unexpected happened when calculates theretries.Hope it’s helpful.
@angryeuan @Crazymuyang create-nuxt-app has been released with the fix.
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. 💩