How can I remove this deprecation warning in MongoDB and why is it happening? - mongodb

I am just trying to create an API and connect to it inside my app.js file but every time I run app.js I am getting this deprecation warning. I have checked all of the deprecation warnings in mongoose and MongoDB but I cannnot find any that match mine. The warning that I am getting is,
(node:16864) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:16864) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.
Why am I getting this deprecation warning and how can I remove it?

I guess this warning occurs with mongoose 5.11.16 version. If you want to avoid seeing them until the bug gets fixed, instead you can go for mongoose version 5.11.15. Uninstall mongoose 5.11.16 and install npm install mongoose#5.11.15

Ya Its correct mongoose version problem. so please 5.11.16 version change to 5.11.15 version.
npm install --save mongoose#5.11.15

The problem is with the new version which is above 5.11.15
Check your version by running:
npm list | grep "mongoose"
Then move to version 5.11.15 by running:
npm install --save mongoose#5.11.15
It worked that way.

Related

#material-extended/mde package has incompatible dependency error : While upgrading angular 11 to 12

Package "#material-extended/mde" has an incompatible peer dependency to "#angular/animations" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "12.1.2").
Current Version :"#material-extended/mde": "^3.0.3",
Try upgrading angular from 11 to 12 using the following command:
ng update #angular/core --force
Or
ng update #angular/core#12 #angular/cli#12 --force
#material-extended/mde#3.0.3 is nog longer receiving updates. Either someone takes charge of that project and updates it, or you will need to replace your dependency with something else. Using --force is just postponing the point where this library breaks forever.

I get this error running PMD from salesforce CLI, "ERROR running scanner:run: Attempted to resolve unregistered dependency token: "RuleManager""

Can anyone help me with this. Im using Mac. I cant find the location of the rulemanager. Please see error below
Lxxxxxxx:pmd-bin-6.34.0 xxxxxx$ sfdx scanner:run pmd --target /usr/src --category rulesets/java/quickstart.xml -f sarif
(node:17810) [editions-autoloader-none-broadened] Error Plugin: sfdx-cli: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
module: #oclif/config#1.17.0
task: runHook init
plugin: sfdx-cli
root: /Users/xxxxxxx/.local/share/sfdx/client/7.100.0-9d243d8
See more details with DEBUG=*
(Use node --trace-warnings ... to show where the warning was created)
ERROR running scanner:run: Attempted to resolve unregistered dependency token: "RuleManager"
Kieran, this is an issue that we just discovered. It is related to an incompatibility with the version of Node.js that is bundled with the Salesforce CLI and a library that is used by sfdx-scanner.
A temporary workaround can be found at https://github.com/forcedotcom/sfdx-scanner/issues/412
You will need to use the npm installation instead of the pkg installer since you are interested in the Sarif output. Sarif output was added in version 2.6.0. The issue affects versions 2.6.0-2.8.0 when using the pkg installer on a Mac.
We hope to have a fix rolled out in the next couple of days. I will post here when version 2.9 has been released. Sorry for any inconvenience.
Kieran, this issue has been fixed in version 2.9.1. You can upgrade by executing the following commands in your shell.
sfdx plugins:uninstall #salesforce/sfdx-scanner
sfdx plugins:install #salesforce/sfdx-scanner

sequelize keeps showing same message again and again with no errors

Sequelize keeps showing "Loaded configuration file "config\config.json".
Using environment "development"." after every command.
Edit: solved by updating all dependencies to the latest version
npm i sequelize#latest pg#latest pg-hstore#latest
Solved by updating dependencies
npm i sequelize#latest pg#latest pg-hstore#latest

Error: [BABEL] /home/vsts/work/1/s/src/index.js: Cannot find module './src/data' [duplicate]

I created a project with vue-cli 4.1.1, and after running yarn serve, i got the following error
Error: [BABEL] C:\dev\vuestudy\src\main.js: Cannot find module './src/data' (While processing: "C:\\dev\\vuestudy\\node_modules\\#vue\\cli-plugin-babel\\preset.js")
Any tips on this?
Thanks in advance.
UPDATE:
Kousha and Dave are right,after waiting for the core-js package update, I created a new project, and now it's working.
It looks like there's been a bad build of npm package core-js-compat. This is a deep-down dependency of Babel. Lots of things will be affected, things that use Babel.
You will experience this problem if you have core-js-compat v.3.4.6. You can check this by doing npm list core-js-compat. The problem is apparently fixed by v.3.4.7, which was pushed out pretty quickly, about half-an-hour later, but unfortunately it takes a while to spread out through the repositories. You can either wait until an npm update gets you v.3.4.7 or you can go manually download v.3.4.7 if you want to get going right away.
This is a bug with core-js-compat v3.4.6, but already the fix has gone with v3.4.7. See https://github.com/zloirock/core-js/issues/712 for more detail.
You may be able to force install the not-broken version with
npm i core-js-compat#3.4.7 --save
It worked on my machineā„¢
With Vue / Nuxt, you can delete package-lock.json and node_modules and do an npm install to fix this issue.

Meteor error reffering 'uglify-js' on deployment to Modulus.IO

I use Modulus.IO to deploy my Meteor app.
When I am on the development environment there is no problem at all, not in the 'meteor' console nor in the browser js console. But when I deploy it to Modulos.IO, this error appears in Modulus:
Error: Can't find npm module 'uglify-js'. Did you forget to call 'Npm.depends' in package.js within the 'minifiers' package?
at Object.Npm.require (/mnt/data/1/programs/server/boot.js:106:17)
at Package (packages/minifiers/minifiers.js:1)
at packages/minifiers.js:307:4
at packages/minifiers.js:317:3
at /mnt/data/1/programs/server/boot.js:155:10
at Array.forEach (native)
at Function._.each._.forEach (/mnt/data/1/node_modules/underscore/underscore.js:79:11)
at /mnt/data/1/programs/server/boot.js:82:5
[2014-05-16T11:48:10.665Z] Application CRASH detected. Exit code 8.
[2014-05-16T11:48:12.326Z] Application restarted.
/mnt/data/1/programs/server/boot.js:186
}).run();
I have no minifiers package installed and no underscore.js as well.
Ok, good news.
That was some error between NPM and Modulus module version.
I've uninstalled NPM, Modulus module and stopped the deploy environment.
Then installed the latest version of NPM and installed the latest version of Modulus module.
Finally, I've made the deploy again and it's everything ok.
Thanks for all the attention.
P.S.: Remember to install Modulus module globally (-g).