All Nuxt.js projects fail to compile (probably due to a dependency update?)
Nuxt.js projects compile with 5 errors from core-js and chokidar. Tested from multiple machines running on different node versions
yarn dev serveri 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.
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.
Same issue on Mac with Visual Studio.
My recollection is Nuxt requires Core-JS 2 not 3.
Just run npm i -S [email protected]. It solved my problem.
Check this issue:
https://github.com/keystonejs/keystone/issues/1843#issue-512929679
if you're using yarn, it should be solved by running yarn add [email protected]
Thank you all, running yarn add [email protected] was it, am able to build with no issues again.
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. :)
Most helpful comment
Just run
npm i -S [email protected]. It solved my problem.Check this issue:
https://github.com/keystonejs/keystone/issues/1843#issue-512929679