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

fix: add dist to npm tarball #856

Merged
merged 1 commit into from
Jun 26, 2023
Merged

fix: add dist to npm tarball #856

merged 1 commit into from
Jun 26, 2023

Conversation

42tg
Copy link
Contributor

@42tg 42tg commented Jun 26, 2023

Hi,

I stumbled today about the following Error while using the most recent version of @keyv/postgres (1.4.6)

Backend failed to start up Error: Cannot find module '/my/node_modules/@keyv/postgres/dist/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:393:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:606:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:971:27)
    at Function.Module._load (node:internal/modules/cjs/loader:833:27)
    at Module.require (node:internal/modules/cjs/loader:1057:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at loadStore (/my/node_modules/keyv/src/index.js:22:15)
    at new Keyv (/my/node_modules/keyv/src/index.js:50:22)
    at createPlugin (webpack-internal:///./src/plugins/auth.ts:38:131)
    at main (webpack-internal:///./src/index.ts:101:91)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'MODULE_NOT_FOUND',
  path: '/my/node_modules/@keyv/postgres/package.json',
  requestPath: '@keyv/postgres'
}

Seems like you introduced a bug on npm while you moving to typescript build steps. dda4712

And don't add the src directory to the tarball pushed to npm:
https://www.jsdelivr.com/package/npm/@keyv/postgres?tab=files

Maybe double check you other plugins but this one is broken since then and you have to use an version below 1.4.5 currently

Greetings Tobias

Signed-off-by: Tobias Graf <tobiasgraf87@gmail.com>
@jaredwray jaredwray merged commit b151320 into jaredwray:main Jun 26, 2023
5 checks passed
@jaredwray
Copy link
Owner

@42tg - thanks so much for the find and we have published an updated version with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants