-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Error while installing SB with PNPM on SvelteKit project #15675
Comments
Hey, noticed the same issue but had a suspicion which turned out to be true. The problem here is not about The following chain of commands using
Failure:
|
👍 Fixed and works perfectly thanks to @jesperp on #12995 (Fix for EINVALIDPACKAGENAME error on install) and @schindld on #11587 (Fix for ERR_REQUIRE_ESM error on run). Install SB on top of your existing Svelte project:
Change the following before running SB:
Run SB:
🎉 🥳 🎉 |
Can this workaround be put into the Storybook Svelte Docs? This is also the fix for my SvelteKit (no PNPM) project. SvelteKit is the new Svelte! |
Trying to upgrade Storybook with:
Return this:
Even after this fix. |
Same for me, spur/apps/client on auth-frontend [!?] is 📦 v0.0.1 via v16.15.1
❯ pnpx sb upgrade (base)
.../Library/pnpm/store/v3/tmp/dlx-9585 | WARN deprecated source-map-resolve@0.5.3
.../Library/pnpm/store/v3/tmp/dlx-9585 | WARN deprecated resolve-url@0.2.1
.../Library/pnpm/store/v3/tmp/dlx-9585 | WARN deprecated urix@0.1.0
.../Library/pnpm/store/v3/tmp/dlx-9585 | WARN deprecated source-map-url@0.4.1
.../Library/pnpm/store/v3/tmp/dlx-9585 | WARN deprecated chokidar@2.1.8
.../Library/pnpm/store/v3/tmp/dlx-9585 | WARN deprecated querystring@0.2.0
.../Library/pnpm/store/v3/tmp/dlx-9585 | WARN deprecated fsevents@1.2.13
.../Library/pnpm/store/v3/tmp/dlx-9585 | +891 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /Users/rohanrajpal/Library/pnpm/store/v3
Virtual store is at: ../../../../../../Library/pnpm/store/v3/tmp/dlx-9585/node_modules/.pnpm
.../Library/pnpm/store/v3/tmp/dlx-9585 | Progress: resolved 924, reused 924, downloaded 0, added 891, done
• Checking for latest versions of '@storybook/*' packagesinfo ,Upgrading /Users/rohanrajpal/Documents/spurchat/code/spur/apps/client/package.json
info
info All dependencies match the latest package versions :)
info ,npm WARN exec The following package was not found and will be installed: npm-check-updates@latest
info
info
• Installing upgrades • Preparing to install dependencies. ✓
npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path /Users/rohanrajpal/Documents/spurchat/code/spur/node_modules/.pnpm/@storybook+addon-links@6.5.8_iyzgk4ls74ludc4c4235ks5ppm/node_modules/@storybook/addon-links
npm ERR! command failed
npm ERR! command sh -c node ../../scripts/prepare.js
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module '/Users/rohanrajpal/Documents/spurchat/code/spur/node_modules/.pnpm/@storybook+addon-links@6.5.8_iyzgk4ls74ludc4c4235ks5ppm/node_modules/scripts/prepare.js'
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR! at node:internal/main/run_main_module:17:47 {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: []
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rohanrajpal/.npm/_logs/2022-06-12T08_35_07_367Z-debug-0.log
. ✖
An error occurred while installing dependencies.
ERROR Command failed with exit code 1: /Users/rohanrajpal/Library/pnpm/store/v3/tmp/dlx-9585/node_modules/.bin/sb upgrade
``` |
similar thing I am experiencing:
|
Was quite excited with the announcement of first class Vite support https://storybook.js.org/blog/first-class-vite-support-in-storybook/ But I guess since 7.0 is in Alpha, still some work is required. For now, it installs yarn on my project, tho everything sets up correctly but I think yarn is not required, right? Maybe pnpm support in 7.0 is yet to catchup . On running https://gist.github.com/rohanrajpal/0ed2a3cc71cf38dbc4cea07c838a3e19 |
This has been fixed in the latest storybook 7.0 beta versions. As long as you have a Please let us know if you still have any issues installing storybook 7.0 using pnpm. |
Thats amazing! Also how does one setup storybook with pnpm workspaces? Since the pnpm-lock.yml will be in the root but i would only want to install storybook on the client. |
That should be fine, just run the |
So that means there wont be any Does not seem to be the same in my case Log: https://pastebin.com/mC34Nwcx Also running |
Ended up making it work via the following steps
|
Thanks for reporting the trouble and the workaround. I'll create a new ticket for this and work on cleaning it up. 👍 Edit: I wasn't able to reproduce this, @rohanrajpal. I think you may have a |
You're welcome and thanks for the efforts on supporting pnpm! I created a fresh svelte kit project with pnpm and the issue seems to be still there. Maybe something is wrong my machine? perhaps the pnpm version? |
I've moved this to its own issue, we can continue to troubleshoot there. |
Describe the bug
Storybook does not install correctly when using PNPM on a SvelteKit project.
Receive "npm WARN old lockfile" and "npm ERR! code EINVALIDPACKAGENAME"
To Reproduce
pnpm init svelte@next new_folder_name
cd new_folder_name
pnpm i
Either
pnpx sb init
orpnpx sb@next init
(sb 6.4.0-alpha.20)System
Additional context
The debug log:
The text was updated successfully, but these errors were encountered: