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

bug: can't install dev dependencies - sherif fails #763

Closed
chrishoermann opened this issue Nov 22, 2023 · 7 comments
Closed

bug: can't install dev dependencies - sherif fails #763

chrishoermann opened this issue Nov 22, 2023 · 7 comments
Labels
has workaround upstream problem is on an upstream package

Comments

@chrishoermann
Copy link

Provide environment information

System:
OS: Windows 11 10.0.22631
CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
Memory: 45.68 GB / 63.14 GB
Binaries:
Node: 20.3.1 - C:\Program Files\nodejs\node.EXE
npm: 9.8.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.10.5 - C:\Program Files\nodejs\pnpm.CMD

Describe the bug

When trying to install something to dev dependencies in any package or app the postinstall script throws the following error:

../.. postinstall$ pnpm lint:ws
│ > create-t3-turbo@ lint:ws C:\_coding\rfk-plattform                                                                                                                                                                                                                                                                                                                                                                                                                                 
│ > pnpm dlx sherif@latest
│ Progress: resolved 1, reused 0, downloaded 0, added 0
│ Packages: +2
│ ++
│ Progress: resolved 7, reused 2, downloaded 0, added 2, done
│  ERR_INVALID_ARG_TYPE  The "path" argument must be of type string. Received undefined
│ pnpm [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
│     at new NodeError (node:internal/errors:405:5)
│     at validateString (node:internal/validators:162:11)
│     at Object.join (node:path:433:7)
│     at getBinName (C:\Users\Chris\AppData\Local\node\corepack\pnpm\8.10.5\dist\pnpm.cjs:209901:37)
│     at Object.handler [as dlx] (C:\Users\Chris\AppData\Local\node\corepack\pnpm\8.10.5\dist\pnpm.cjs:209877:54)
│     at async C:\Users\Chris\AppData\Local\node\corepack\pnpm\8.10.5\dist\pnpm.cjs:219647:21
│     at async main (C:\Users\Chris\AppData\Local\node\corepack\pnpm\8.10.5\dist\pnpm.cjs:219614:34)
│     at async runPnpm (C:\Users\Chris\AppData\Local\node\corepack\pnpm\8.10.5\dist\pnpm.cjs:219871:5)
│     at async C:\Users\Chris\AppData\Local\node\corepack\pnpm\8.10.5\dist\pnpm.cjs:219863:7
│  ELIFECYCLE  Command failed with exit code 1.
└─ Failed in 1.5s at C:\_coding\rfk-plattform
 ELIFECYCLE  Command failed with exit code 1.

maybe a windows issue since no one else has encountered this yet?

Link to reproduction

start repo in a codespace and run pnpm -filter @acme/nextjs add @types/leaflet -D

To reproduce

try to add something to dev dependencies in any package or app

Additional information

No response

@stemca
Copy link

stemca commented Nov 28, 2023

Have this issue as well on Mac. I have been manually pasting dev dependencies in my package.json and it's tedious.

@trevorpfiz
Copy link

I am getting this as well using WSL2

@timmeade
Copy link

timmeade commented Dec 1, 2023

Ditto. Just hit it.

@QuiiBz
Copy link

QuiiBz commented Dec 15, 2023

Opened an issue on pnpm's repo to resolve it, since this error occurs with any package and not just sherif: pnpm/pnpm#7424

@juliusmarminge
Copy link
Member

Opened an issue on pnpm's repo to resolve it, since this error occurs with any package and not just sherif: pnpm/pnpm#7424

Aight thanks for looking into it. I was too lazy to try other stuff 😅


You can just cd apps nextjs && pnpm add -D @types/leaflet for now anyway. not the biggest deal

@juliusmarminge juliusmarminge added upstream problem is on an upstream package has workaround labels Dec 15, 2023
@adpadillar
Copy link

adpadillar commented Dec 19, 2023

Tried cd packages/db && pnpm add -D drizzle-kit and I still get this

ERR_INVALID_ARG_TYPE  The "path" argument must be of type string. Received undefined

Installing as normal dependency and then changing it to be a devDependency in package.json works fine

@QuiiBz
Copy link

QuiiBz commented Jan 28, 2024

The fix has been released in pnpm v9.0.0-alpha.1 and I've been able to confirm that it works:

Screenshot 2024-01-28 at 09 45 53

We should probably wait for a stable release before closing this issue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has workaround upstream problem is on an upstream package
Projects
None yet
Development

No branches or pull requests

7 participants