question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm@5 TypeError: Cannot read property 'version' of null

See original GitHub issue

Looks like using npm 5 we have a problem.

package_json.version at line 262 is undefined and throws at line 270

TypeError: Cannot read property 'version' of null
    at Object.module.exports.evaluate (/Users/yvele/repo/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js:270:32)
    at install (/Users/yvele/repo/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js:168:31)
    at Object.self.commands.(anonymous function) [as install] (/Users/yvele/repo/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js:50:37)
    at run (/Users/yvele/repo/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp:79:30)
    at Object.<anonymous> (/Users/yvele/repo/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp:131:1)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

Main NPM issue:

Related issues:

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:63
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

154reactions
floriantrabercommented, Jun 3, 2017

workaround: Remove the lock file.

rm .\package-lock.json

20reactions
alexjlockwoodcommented, Jun 14, 2017

I added package-lock=false to the .npmrc file in my repo’s root directory in order to temporarily workaround the issue. Seemed cleaner than adding it to the .gitignore. 😛

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'version' of null - npm - Stack Overflow
Try this command in your terminal for your first warning, 1.$ npm cache clean --force 2.delete node_modules by $ rm -rf node_modules 3....
Read more >
npm@5 TypeError: Cannot read property 'version' of null
Looks like using npm 5 we have a problem. package_json.version at line 262 is undefined and throws at line 270 TypeError: Cannot read...
Read more >
npm err! cannot read properties of null - You.com
my npm version is 8.1.4 and i solve this problem by running : ... node.js:TypeError: Cannot read properties of null (reading 'matches').
Read more >
Ionic 3.5.0 was released!
But there is no new version of the plugin. ... First bug while installing, “TypeError: Cannot read property 'version' of null”, ...
Read more >
Changelog | Wechaty - JS.ORG
Bump wechaty-puppet-padchat version #1571 (windmemory); Edit room doc #1570 (kis87988) ... TypeError: Cannot read property 'type' of undefined at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found