BUG on 1.7.2: Please verify that the package.json has a valid "main" entry
rilpires opened this issue · comments
My project was using this as dependency:
"mongoose-paginate-v2": "~1.7.1"
Now with 1.7.2 release, it has broken 😬
To Reproduce
Steps to reproduce the behavior:
A simple node project (without typescript, don't know if with typescript it occurs) that was using version 1.7.1, after upgrading, it throws this error:
Uncaught Error Error: Cannot find module '/home/rilpires/myproject/node_modules/mongoose-paginate-v2/dist/index.js'. Please verify that the package.json has a valid "main" entry
- OS: Kubuntu 22.04
- mongoose-paginate-v2: version 1.7.1 to 1.7.2
Looks like there is no dist folder on published package
I've also just run into this. dist/index.js
is missing.
damm i spent one hour to debug
Thanks for the heads up!
How solve it?
How solve it?
Pin the dependency to 1.7.1 until it's resolved.
"mongoose-paginate-v2": "1.7.1",
same issue
node_modules/mongoose-paginate-v2/dist/index.js'. Please verify that the package.json has a valid "main" entry at tryPackage (node:internal/modules/cjs/loader:436:19) at Module._findPath (node:internal/modules/cjs/loader:678:18) at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27) at Module._load (node:internal/modules/cjs/loader:920:27) at Module.require (node:internal/modules/cjs/loader:1141:19)
See if the new version works v1.7.22
Seems like it didn't run pre run test before deploying.
The same error occurs in version: 1.7.22.
The same error occurs in version: 1.7.22.
@pinceladasdaweb The tests are running fine. Can you try deleting and then installing the package.
I just tested it and it's working ok. Thanks.
Fixed in latest build.