Whenever I try to build a new ionic project angular from console it give me, npm ERR! Cannot read properties of undefined (reading 'isServer')

Viewed 669

npm ERR! Cannot read properties of undefined (reading 'isServer') i updated npm to latest version, i tried to force clear the cache didn't resolve. Anyone can help?

4 Answers

The problem is npm modules are unable to download from node repository central, i suggest you to follow below steps....

1)Run Command npm config edit 2)then proxy file opens in notepad 3)try to add registry=https://registry.npmjs.org/ and save 4)make sure to add strict-ssl=false in case above doesnt work... Thanks !!!!!

I downgraded the node version to 14.0.0 using nvm version, if anyone having same problem, this was my solution! :)

If you search SO for Cannot read properties of undefined (reading 'isServer') then you currently get four results, all in the last month. So it looks like me like a genuine new bug. What fixed it for me was installing git on my system (possibly unrelated) and switching to Yarn.

In my experience this was an issue in node 17.x. I reverted back to 16.13 which is the latest LTS release at time of writing and my Azure DevOps pipeline started working again.

Related