mobxjs / mobx-react

React bindings for MobX
https://mobx.js.org/react-integration.html
MIT License
4.85k stars 350 forks source link

Latest package.json main points to unexisting file #831

Closed enzobrands closed 4 years ago

enzobrands commented 4 years ago

Hi,

The latest update to this package causes importing to fail.

npm install mobx-react
echo "require('mobx-react')" > test.js
node test.js

Error: Cannot find module '/.../node_modules/mobx-react/dist/mobxreact.js'. Please verify that 
    the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:294:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:525:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:781:27)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/../test.js:1:18)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/.../node_modules/mobx-react/package.json',
  requestPath: 'mobx-react'

Seems the file main points to is not present anymore

Greets

Enzo

danielkcz commented 4 years ago

Fixed with 6.1.7 ... you people are so fast checking out new releases 😮

baohx2000 commented 4 years ago

Thanks for quick turnaround! Fast checking (for me anyway) came from using npx with packages that don't have lock files :man_facepalming:

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.