Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.9K
Views
How to resolve (reading 'isServer') error in npm?

Catch this error after npm i. Version npm - 8.0.0, nodejs - 16.11.0.

npm ERR! Cannot read properties of undefined (reading 'isServer')
over 4 years ago · Santiago Trujillo
10 answers
Answer question

0

Update the latest version of Node.js. Then try to install npm the issue won't come. Check out this URL https://nodejs.org/en/ and install a version recommended for most users.

over 4 years ago · Santiago Trujillo Report

0

I had the same issue and tried all the possible solutions. None of them worked. And finally, when I restarted my PC, it worked like a charm :).

over 4 years ago · Santiago Trujillo Report

0

It happened to me because of the node.js version and an npm update.

  1. Uninstall nodejs
  2. Delete folder C:\Users\Administrator\AppData\Roaming\npm
  3. Install nodejs (v17.x)
  4. In your project folder:
npm install -g npm@8.3.2
npm i --package-lock-only
npm audit fix --force

It worked for me. I hope it helps you :)

over 4 years ago · Santiago Trujillo Report

0

Try to use npm with specific version

for example i was trying to use npm install -g truffle and it did not work

but this one work npm install -g truffle@5.0.5

over 4 years ago · Santiago Trujillo Report

0

Try stable Nodejs version 14.16.1 instead of 16. Nodejs 14.16.1 Link

over 4 years ago · Santiago Trujillo Report

0

I kept running into this problem in different scenarios. I found that because I had used a VPN during my computer session, but not during the time I ran 'npm install', it was throwing this error. I simply reinstalled and restarted and did not enable my VPN during that session. Although, you may not have to completely reinstall-- only restart you PC without using a VPN after restart-- I do not know as I have not tried.

(Specifically I was using Express VPN)

Update: I ran into the problem again immediately after a fresh install and restart. Again I restarted my computer (without a fresh install as I had just reinstalled it.) This seemed to work for the moment. Will update with any permanent fixes I come across.

over 4 years ago · Santiago Trujillo Report

0

Copying the npmrc.5 file from: C:\Program Files\nodejs\node_modules\npm\man\man5 to C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm seemed to work for me:

Copy-Item -Path C:\Program Files\nodejs\node_modules\npm\man\man5 -Destination C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm –Passthru

over 4 years ago · Santiago Trujillo Report

0

I've got the same issue, then I updated npm to 8.3.0, and the problem is solved.

over 4 years ago · Santiago Trujillo Report

0

Based on what I've read on issues related, it seems like there's conflicting global packages and node versions.

Please try uninstalling both node and npm and try again.

Check out these issues for more details:

Node error Cannot read property 'resolve' of undefined

Cannot read property 'resolve' of undefined when using npm to install a package

over 4 years ago · Santiago Trujillo Report

0

I had the same issue with close versions of node and npm. I was using a shared connection from my phone since I wasn't home. When I get back home and used my WiFi things got back to normal.

If you are using such kind of connection then it is probably that causes this issue.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!