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

pnpm support #25

Closed
ai opened this issue Dec 10, 2021 · 2 comments
Closed

pnpm support #25

ai opened this issue Dec 10, 2021 · 2 comments

Comments

@ai
Copy link
Contributor

ai commented Dec 10, 2021

When I call (or do the same in package.scripts but without pnpx):

pnpx tsm node_modules/.bin/uvu . '\\.test\\.(ts|js)$'

I got in pnpm:

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for /home/ai/Dev/nanostores/node_modules/.bin/uvu
    at new NodeError (node:internal/errors:371:5)
    at Object.file: (node:internal/modules/esm/get_format:72:15)
    at defaultGetFormat (node:internal/modules/esm/get_format:85:38)
    at defaultLoad (node:internal/modules/esm/load:22:14)
    at load (file:///home/ai/Dev/nanostores/node_modules/.pnpm/tsm@2.2.1/node_modules/tsm/loader.mjs:1:1017)
    at async ESMLoader.load (node:internal/modules/esm/loader:353:20)
    at async ESMLoader.moduleProvider (node:internal/modules/esm/loader:274:47)
    at async link (node:internal/modules/esm/module_job:70:21) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Reproduction:

git clone git@github.com:nanostores/nanostores.git
git checkout chore/pnpm
pnpm unit
@PabloSzx
Copy link

PabloSzx commented Dec 10, 2021

But node_modules/.bin/uvu is not a JavaScript/TypeScript file

image

When changing to: "unit": "tsm node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'", everything works fine

@ai
Copy link
Contributor Author

ai commented Dec 10, 2021

Got it. Thanks. My mistake.

@ai ai closed this as completed Dec 10, 2021
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

No branches or pull requests

2 participants