Cannot resolve dependencies for #nestjs/swagger - swagger

I am trying to install #nestjs/swagger using npm i #nestjs/swagger as per documentation.
I get the following error:
npm ERR! Could not resolve dependency:
npm ERR! peer #nestjs/common#"^9.0.0" from #nestjs/swagger#6.0.3
Any idea what is the issue?I can see that the package was last published a few hours ago, not sure if related.

npm-check-updates "/nestjs*/" -u and nest update solved this

Related

How to install expo CLI on macbook pro big sur?

I an having issue regarding the installation of expo on the new mac.
When I run this command:
npm install --global expo-cli
I have the error:
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/theowatine/.npm/_logs/2020-11-21T09_26_14_033Z-debug.log
Does anyone know what could be the solution? Thank you for your help!
This is a common issue when using a globally-installed npm. The npm docs contain a page about it.
They recommend reinstalling node/npm with a version manager (like nvm). This is often a very good option if you are developing something locally. If you do that, this problem will go away. You can stop reading this answer if you want.
They also provide a way to configure npm to put the globally installed items in a directory of your choosing. That is a good option too, if a version manager won't work for you for whatever reason.
Another option they mention is using npx instead of globally installing the tool. I use this one a lot and like it quite a bit, but it does mean that you frequently have to remember to prefix commands you see with npx.
There are two somewhat common options that they do not list. One is to run your install with sudo. This means that any lifecycle scripts will get run as root on your machine. This is generally a bad idea (which is why they don't mention it in the docs), but is very common.
Another option is to chmod your /usr/local/lib/node_modules directory such that you can write to it. This is also a not-great idea in my opinion (which is probably why it too is not mentioned in the docs), but people do it.
In the case of expo-cli and in most developing-something-locally cases, installing with a package manager like nvm is probably the way to go.
I am also using macOS Big Sur on mbp and i experienced same issue. After reading Trott's answer i downloaded node from https://nodejs.org/en/download/ and installed it. Now expo and react native working fine.
Homebrew version of node is failed to install expo at all time but direct download from nodejs.org worked fine.
try this:
sudo npm install -g expo-cli
I am using Big sur(11.4) and I have downloaded latest version of node
https://nodejs.org/en/download/
Then run the following command for install expo and its working fine.
npm install --global expo-cli

Errors trying to publish npm package

I published fine last week but I tried today and it does not work on any of my computers. It is weird, at first I thought there was an issue with the service but then I started doing some solutions I found on the web and now I get this when I try npm adduser:
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://npm.pkg.github.com/estebanpadilla/-/user/org.couchdb.user:ludusy
npm ERR! 404
npm ERR! 404 'org.couchdb.user:ludusy' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because
npm ERR! 404 1. name can only contain URL-friendly characters
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/estebanpadilla/.npm/_logs/2020-08-11T03_27_17_364Z-debug.log
I looked all over for a possible solution but nothing seems to work.
npm whoami gives this result:
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/estebanpadilla/.npm/_logs/2020-08-11T03_29_57_501Z-debug.log
Does anyone have an idea on how to get it working again?
Thank you.
It looks like you're not logged in. I think you need to run npm adduser and follow the prompts.
Just a quick tip -- make sure to carefully read the error message. I think this line is telling you exactly what you need to do! npm ERR! need auth You need to authorize this machine using npm adduser.
It is working now, for some reason I was not able to run npm adduser or npm whoami on the project directory but I was able on any other directory so I figure there was something wrong with some configuration file inside the project. I removed any file that wasn't essential and it work.
Thanks for your help.

I wanna reinstall expo-cli, but there is err. And can't uninstall expo-cli

I tried to build the app through expo but failed, and I tried to reinstall expo-cli.
So, I entered the code below to remove the expo-cli.
npm -g uninstall expo-cli --save
and
(base) Bongui-MacBookPro:expo-firebase-master bong$ npm uninstall expo-cli -g
up to date in 0.042s
However, if i type expo, it will run.
So if you ignore it again and try to reinstall expo-cli,
The following errors occur:
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/expo-cli/bin/expo.js
npm ERR! dest /Users/bong/npm-global/bin/expo-cli
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/Users/bong/npm-global/bin/expo-cli'
npm ERR! File exists: /Users/bong/npm-global/bin/expo-cli
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bong/.npm/_logs/2020-01-28T09_18_38_604Z-debug.log
Thank you, teachers.
Please help me solve the problem.
Thank you.
I think you might want to overwrite your current folder while you building.
Try and use the --force extension in your command and that will resolve the problem. I presume something like : npm install -g --force expo-cli
I hope that will help.
I am using linux , Ubuntu i tried
sudo npm install -g --force expo-cli
it worked for me.

Cannot read property 'map' of undefined npm ERR! code ELIFECYCLE npm ERR! errno 1 fir React Front End/Rails Backend

I get this error message when I run npm start:
Cannot read property 'map' of undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! quote-react-redux#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the quote-react-redux#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Anyone have an idea of what is going on? Or is there any documentation to read npm error logs as well?
I have gotten similar errors, ie. to reproduce one of mine:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-default#0.1.0 develop: `gatsby develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gatsby-starter-default#0.1.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
The problem occurs when I am running a different version of node than the one I used to either generate the app with, or perhaps was cloned from elsewhere and forgot to run npm install.
Fix 1: Change the node version to the same version the app was generated with in the directory you are trying to launch the server via your node version manager.
Fix 2: Make sure you have the node version you want to run set in the directory you are working in, then npm install. You may want to do this in an new git branch, until you get it running, then merge into master, as sometimes if the versions were really different you may need to manually install additional packages (they will be listed).
Fix 3: Clear out and start from scratch (probably better than Fix 2). Try:
npm cache clean --force
rm package-lock.json
/bin/rm -rf node_modules/
npm install

ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0

I get that message every time when trying to install zapier-cli.
Can someone help me with solving the issue?
I think you need to manually install ajv or update it to version 6 if you already have a lower version installed
npm i ajv
I had a similar issue so I installed it manually and everything worked for me
David here, from the Zapier Platform team. It looks like this is a bug with npm itself. Updating npm (npm i -g npm) or manually installing ajv (npm i -g ajv#6) should resolve the warning.
Problems: npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed.
You must install peer dependencies by yourself.
You missed the dependencies of ajv#^6.0.0
Just install it :
npm install ajv#^6.0.0

Resources