Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.9K
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório

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 Relatório

0

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

over 4 years ago · Santiago Trujillo Relatório

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 Relatório

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 Relatório

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda