rwillians / express-rescue

Sugar code layer for async middlewares and error handers, rewarding you with cleaner and more readable code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Files inside dist aren't being published

EddyeBoy27 opened this issue · comments

Helo @rwillians I updated but the error continue...
I looked at some changes and saw that there was a change from node 13 to 14, I tried to update the node and still the error continued, I also saw that there was a change in package.json, but I don't understand how it works, through my error you can identify what is happening?

internal/modules/cjs/loader.js:326
      throw err;
      ^

Error: Cannot find module '/media/liipe/HD_TB/Liipe_Xubuntu/mythings/NOTEBOOK/Projetos/sd-02-project-store-manager/node_modules/express-rescue/dist/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:318:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:679:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:949:27)
    at Function.Module._load (internal/modules/cjs/loader.js:838:27)
    at Module.require (internal/modules/cjs/loader.js:1022:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/media/liipe/HD_TB/Liipe_Xubuntu/mythings/NOTEBOOK/Projetos/sd-02-project-store-manager/controllers/productController.js:1:16)
    at Module._compile (internal/modules/cjs/loader.js:1118:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
    at Module.load (internal/modules/cjs/loader.js:982:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/media/liipe/HD_TB/Liipe_Xubuntu/mythings/NOTEBOOK/Projetos/sd-02-project-store-manager/node_modules/express-rescue/package.json',
  requestPath: 'express-rescue'
}
[nodemon] app crashed - waiting for file changes before starting...

@EddyeBoy27 I see. Your node version isn't the cause of the problem, it's the CI that isn't publishing to NPM the files inside /dist directory, that's why when you require the module it fails -- which is weird cuz according to the dry-run I ran locally it should be publishing everything normally. Anyways, I'll find a way to fix it today, meanwhile it should be fine for you to stick with v1.1.26.

@EddyeBoy27 I'm pretty sure I've got it this time, here.
Please update to v1.1.30 and lemme know if it worked for you ;)

Very nice @rwillians . I updated and tested my application and now it works perfectly!!
Thanky you very much!!
Your work is wonderful <3