Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./lib/** is not published to NPM #52

Closed
Lakitna opened this issue Oct 15, 2021 · 1 comment · Fixed by #61
Closed

./lib/** is not published to NPM #52

Lakitna opened this issue Oct 15, 2021 · 1 comment · Fixed by #61
Labels
bug Something isn't working released

Comments

@Lakitna
Copy link

Lakitna commented Oct 15, 2021

Describe the bug

The entirety of the ./lib/** folder is not published to NPM. This should contain the compiled .js and .d.ts files.

These file are referenced in the package.json:

  "main": "./lib/index.js",
  "types": "./lib/index.d.ts",

Because of this, Optimizer can't be used right now as both require and import don't work.

How to Reproduce

λ npm i @asyncapi/optimizer
...
λ node
Welcome to Node.js v16.3.0.
Type ".help" for more information.
> const { Optimizer } = require('@asyncapi/optimizer')
Uncaught:
Error: Cannot find module 'C:\Data\scratch\node_modules\@asyncapi\optimizer\lib\index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:349:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:562:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:27)
    at Function.Module._load (node:internal/modules/cjs/loader:774:27)
    at Module.require (node:internal/modules/cjs/loader:1013:19)
    at require (node:internal/modules/cjs/helpers:93:18) {
  code: 'MODULE_NOT_FOUND',
  path: 'C:\\Data\\scratch\\node_modules\\@asyncapi\\optimizer\\package.json',
  requestPath: '@asyncapi/optimizer'
}

Same thing for import.

See also the file tree in the node_modules:

image

Expected behavior

Import and require work

@Lakitna Lakitna added the bug Something isn't working label Oct 15, 2021
@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants