babel-plugin-add-module-exports icon indicating copy to clipboard operation
babel-plugin-add-module-exports copied to clipboard

Error: Cannot find module 'babel-plugin-add-module-exports' on 1.0.1

Open EsanLe opened this issue 5 years ago • 20 comments

New package with version 1.0.1 is broken

When I run babel src -d lib --delete-dir-on-start, the console shows:

{ Error: Cannot find module 'babel-plugin-add-module-exports'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3) code: 'MODULE_NOT_FOUND' }

And the new package is empty, I try to revert to 1.0.0 everything worked.

npm i [email protected]

ls -al ./node_modules/babel-plugin-add-module-exports/
total 8
drwxr-xr-x    5 eiddle staff   160 Apr 17 00:46 .
drwxr-xr-x 1970 eiddle staff 63040 Apr 17 00:49 ..
-rw-r--r--    1 eiddle staff  3353 Oct 26  1985 README.md
drwxr-xr-x    3 eiddle staff    96 Apr 17 00:46 node_modules
-rw-r--r--    1 eiddle staff  2116 Apr 17 00:46 package.json

EsanLe avatar Apr 16 '19 16:04 EsanLe

It looks like the compiled javascript is entirely missing from the published package.

$ ls -a node_modules/babel-plugin-add-module-exports/
.            ..           README.md    package.json

Macil avatar Apr 16 '19 23:04 Macil

cc @lijunle - see #71

ljharb avatar Apr 16 '19 23:04 ljharb

Yup this didn't get compiled to lib and there is no 1.0.1 release tag on the repo..confusing

dtothefp avatar Apr 17 '19 01:04 dtothefp

@dtothefp because the other person with publish access doesn’t have commit access.

ljharb avatar Apr 17 '19 02:04 ljharb

+1, only package.json and ReadMe.md, no lib directory

shinnqy avatar Apr 17 '19 03:04 shinnqy

@ljharb plz fix it ASAP

EsanLe avatar Apr 17 '19 03:04 EsanLe

@EiddleChen I’m not one of the people with commit or publish access, unfortunately, or it’d have been fixed half a year ago :-)

ljharb avatar Apr 17 '19 03:04 ljharb

@ljharb oh cool, but who publish the empty package to production tomorrow? Some of my project cannot build now, Can anyone unpublish the 1.0.1 verison package? Is your repository hacked?

EsanLe avatar Apr 17 '19 03:04 EsanLe

No, as i said, @lijunle has publish access but not commit access. Everything’s fine, it’s just a bug.

ljharb avatar Apr 17 '19 03:04 ljharb

@lijunle plz publish a new package or unpublish 1.0.1, my projects dont have lock files, so its best to wait for you to fix it

EsanLe avatar Apr 17 '19 03:04 EsanLe

@EiddleChen just remove the ^ in front of your dependency so you are locked at 1.0.0

dtothefp avatar Apr 17 '19 03:04 dtothefp

Let me unpublish the version 1.0.1 to mitigate it.

lijunle avatar Apr 17 '19 04:04 lijunle

Version 1.0.1 is unpublished.

lijunle avatar Apr 17 '19 04:04 lijunle

After run npm update everything worked, thx!

EsanLe avatar Apr 17 '19 07:04 EsanLe

After run npm update everything worked, thx!

I did it and nothing changed, still having this issue.

Version 1.0.1 is unpublished.

No it is not, I've just installed it.

I try to revert to 1.0.0 everything worked.

True

Thanks for sharing this.

kopax avatar Apr 17 '19 13:04 kopax

@lijunle either way, could you merge #71 into your fork and publish it as v1.0.2? That should address all the issues.

ljharb avatar Apr 17 '19 16:04 ljharb

Sorry about version 1.0.1, I just published 1.0.2. Please try again.

lijunle avatar Apr 17 '19 17:04 lijunle

@ljharb I invited you to be the maintainer for the NPM package.

lijunle avatar Apr 17 '19 17:04 lijunle

@lijunle Thanks! Until we hear from @59naga, would it be OK if i also got commit on your fork? then we can ensure that your fork remains the source of truth until this repo can be updated.

ljharb avatar Apr 17 '19 17:04 ljharb

@ljharb You are now a collaborator of my fork.

lijunle avatar Apr 17 '19 17:04 lijunle