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?]: pnpm dev broken on node >= v20, cannot find package parse-multipart-data #1040

Closed
2 tasks done
peterhirn opened this issue Sep 1, 2023 · 2 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@peterhirn
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

When using Node >= v20 pnpm dev fails with Error: Cannot find package ... \parse-multipart-data\package.json.

[x] Node v19 works
[x] pnpm build works
[x] pnpm start works

I looked into this issue but couldn't figure out why this is happening. parse-multipart-data is imported like any other package in solid-start. Adding parse-multipart-data to my package.json also doesn't resolve the issue.

Sorry if this is only broken on my machine. I removed node_modules and the shared pnpm store and re-installed everything from scratch before testing this.

Expected behavior 🤔

No response

Steps to reproduce 🕹

nvm use 20
pnpm create solid
pnpm i
pnpm dev
> solid-start dev

 solid-start dev 
 version  0.3.5
 adapter  node
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: Cannot find package 'C:\Users\User\Documents\Projects\private\solid-start-tests\show-hydration-issue\node_modules\.pnpm\[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]\node_modules\parse-multipart-data\package.json' imported from C:\Users\User\Documents\Projects\private\solid-start-tests\show-hydration-issue\node_modules\.pnpm\[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]\node_modules\solid-start\node\fetch.js
Did you mean to import [email protected]/node_modules/parse-multipart-data/dist/multipart.js?
    at legacyMainResolve (node:internal/modules/esm/resolve:188:26)
    at packageResolve (node:internal/modules/esm/resolve:769:14)
    at moduleResolve (node:internal/modules/esm/resolve:831:20)
    at defaultResolve (node:internal/modules/esm/resolve:1036:11)
    at DefaultModuleLoader.resolve (node:internal/modules/esm/loader:251:12)
    at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:140:32)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:33)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Context 🔦

No response

Your environment 🌎

Windows 10
@peterhirn peterhirn added the bug Something isn't working label Sep 1, 2023
@edivados
Copy link
Contributor

edivados commented Sep 1, 2023

Hmmm... can't reproduce with a fresh bare template. I am on

OS: Windows 10
Node: 20.5.1
pnpm: 8.7.0

@peterhirn Out of curiosity can you give your exact node version and pnpm version? Also what template did you use?

@peterhirn
Copy link
Author

peterhirn commented Sep 1, 2023

Hey, thanks a lot for trying to reproduce! Looks like this really is only broken on my machine.

I tested a couple of node versions, including v20.5.1 and I'm currently on pnpm v8.7.1. The template I selected was bare + typescript.

Since it works for you I'll give it another shot, cleaning up everything as good as possible and start over.

Update: After another round of cleaning pnpm, switching between node versions a couple of times and starting over in a clean directory everything is working again with latest versions (node v20.5.1, pnpm v8.7.1). ¯\_(ツ)_/¯

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

No branches or pull requests

2 participants