Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt.js projects fail to compile #3049

Closed
giotigre opened this issue May 26, 2020 · 6 comments
Closed

Nuxt.js projects fail to compile #3049

giotigre opened this issue May 26, 2020 · 6 comments

Comments

@giotigre
Copy link

Bug report

All Nuxt.js projects fail to compile (probably due to a dependency update?)

Describe the bug

Nuxt.js projects compile with 5 errors from core-js and chokidar. Tested from multiple machines running on different node versions

To Reproduce

  1. create a new Nuxt project through create-keystone-app
  2. run the default yarn dev server
  3. app compiles with errors. see console log below

Console log

i Command: keystone dev
√ Validated project entry file ./index.js
√ Keystone server listening on port 3000
√ Initialised Keystone instance
- Connecting to databasei Preparing project for development
              18:38:54
i Initial build may take a while                                                          18:38:54
\ Connecting to database√ Builder initialized
              18:38:55
\ Connecting to database√ Nuxt files generated
              18:39:08

× Client
  Compiled with some errors in 11.96s

√ Server
  Compiled successfully in 11.10s


 ERROR  Failed to compile with 5 errors                                   friendly-errors 18:39:25

These dependencies were not found:                                        friendly-errors 18:39:25
                                                                          friendly-errors 18:39:25
* core-js/modules/es6.regexp.to-string in ./dist/client.js, ./dist/components/nuxt-link.client.js
* core-js/modules/es7.promise.finally in ./dist/client.js                 friendly-errors 18:39:25
* core-js/modules/es7.symbol.async-iterator in ./dist/client.js, ./dist/components/nuxt-link.client.

js
                                                                          friendly-errors 18:39:25
To install them, you can run: npm install --save core-js/modules/es6.regexp.to-string core-js/module

s/es7.promise.finally core-js/modules/es7.symbol.async-iterator
i Waiting for file changes                                                                18:39:25
- Connecting to databaseError from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\

DumpStack.log.tmp'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'
× Connecting to database
Error: connect ECONNREFUSED 127.0.0.1:27017
    at resolveAllKeys (C:\%projectfolder%\node_modules\@keystonejs\utils\dist\utils.cjs.dev.js:48:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Keystone.connect (C:\%projectfolder%\node_modules\@keystonejs\keystone\lib\Keystone\index.js:459:5)
    at async executeDefaultServer (C:\%projectfolder%\node_modules\@keystonejs\keystone\bin\utils.js:114:3) {
  errors: {
    MongooseAdapter: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
        at NativeConnection.Connection.openUri (C:\%projectfolder%\node_modules\mongoose\lib\connection.js:823:32)
        at Mongoose.connect (C:\%projectfolder%\node_modules\mongoose\lib\index.js:333:15)
        at MongooseAdapter._connect (C:\%projectfolder%\node_modules\@keystonejs\adapter-mongoose\lib\adapter-mongoose.js:59:25)
        at MongooseAdapter.connect (C:\%projectfolder%\node_modules\@keystonejs\keystone\lib\adapters\index.js:22:16)
        at C:\%projectfolder%\node_modules\@keystonejs\keystone\lib\Keystone\index.js:459:63
        at C:\%projectfolder%\node_modules\@keystonejs\utils\dist\utils.cjs.dev.js:22:10
        at Array.reduce (<anonymous>)
        at mapKeys (C:\%projectfolder%\node_modules\@keystonejs\utils\dist\utils.cjs.dev.js:21:52)
        at Keystone.connect (C:\%projectfolder%\node_modules\@keystonejs\keystone\lib\Keystone\index.js:459:26)
        at executeDefaultServer (C:\%projectfolder%\node_modules\@keystonejs\keystone\bin\utils.js:114:18)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
      reason: [TopologyDescription]
    }
  }
}
error Command failed with exit code 1.

System information

  • Windows 10 x64
  • Node.js 12.16.3, 10.16.3
  • yarn 1.22.4, 1.19.1

Additional context

I have had successful builds in the past weeks with this. I've lost a yarn.lock file on a previously working project and after downloading dependencies again, this error was thrown. While troubleshooting I figured I'd try running the default example and the same behavior occurred, so I'd guess something changed in dependencies.

Following the friendly-errors prompt to install the missing core-js packages results in a 405 error.

@MetaBureau
Copy link

MetaBureau commented May 27, 2020

Same issue on Mac with Visual Studio.
My recollection is Nuxt requires Core-JS 2 not 3.

@matheuschimelli
Copy link
Contributor

matheuschimelli commented May 30, 2020

Just run npm i -S core-js@2.5.7. It solved my problem.
Check this issue:
#1843 (comment)

@dendihandian
Copy link

if you're using yarn, it should be solved by running yarn add core-js@2.5.7

@giotigre
Copy link
Author

giotigre commented Jul 8, 2020

Thank you all, running yarn add core-js@2.5.7 was it, am able to build with no issues again.

@stale
Copy link

stale bot commented Nov 6, 2020

It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)

@stale stale bot added the needs-review label Nov 6, 2020
@bladey
Copy link
Contributor

bladey commented Apr 8, 2021

Keystone 5 has officially moved into active maintenance mode as we push towards the next major new version Keystone Next, you can find out more information about this transition here.

In an effort to sustain the project going forward, we're cleaning up and closing old issues such as this one. If you feel this issue is still relevant for Keystone Next, please let us know.

@bladey bladey closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants