-
Notifications
You must be signed in to change notification settings - Fork 32
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
Storybook Resolution Errors #4
Comments
I arranged same Environment and try it but not caused same trouble. I think this problem depends on your "Additional Context". How to resolve those problem is out of support this book because it was written only using npm workspace. If I will provide some solution for you, I have to answer how to resolve all of inquiries to keep fair. Therefore, If you want to use something other composition, it's just your responsibility how to resolve it. I appreciate your understanding and cooperation. Thanks |
ご返信ありがとうございます。
gitcloneして何も変更してないのです。sns-shared-uiにおいて"npm run storybook"のコマンドを打つとエラーが出るのです。
本では下記の環境で記載させているが、このgithubのリポジトリ内のpackage.jsonを見ると下記とは違うものが記載させており、それが原因でしょうか?
本の中のでの指定 next:14.1.0、eslint-config-next:14.1.0、react:18.2.0、react-dom:18.2.0、typescript:5.2.2
再度、試してみます。
他の人間も同様のエラーが出ております。。。。。。。
--------------------------------------------
⚫︎エラー内容
npm run s
torybook
***@***.*** storybook
storybook dev -p 6006
@storybook/cli v7.5.1
(node:7354) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info => Serving static files from ././public at /
info => Starting manager..
WARN No story files found for the specified pattern: src/**/*.mdx
✘ [ERROR] Could not resolve ***@***.***/addon-viewport/manager"
..***@***.***/addon-essentials/dist/viewport/manager.mjs:1:14:
1 │ ...* from ***@***.***/addon-viewport/manager';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/addon-viewport" here because it's not
listed as a dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path
***@***.***/addon-viewport/manager" as external to
exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve ***@***.***/addon-actions/manager"
..***@***.***/addon-essentials/dist/actions/manager.mjs:1:14:
1 │ ... * from ***@***.***/addon-actions/manager';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/addon-actions" here because it's not
listed as a dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path
***@***.***/addon-actions/manager" as external to
exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve ***@***.***/addon-outline/manager"
..***@***.***/addon-essentials/dist/outline/manager.mjs:1:14:
1 │ ... * from ***@***.***/addon-outline/manager';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/addon-outline" here because it's not
listed as a dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path
***@***.***/addon-outline/manager" as external to
exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve ***@***.***/addon-measure/manager"
..***@***.***/addon-essentials/dist/measure/manager.mjs:1:14:
1 │ ... * from ***@***.***/addon-measure/manager';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/addon-measure" here because it's not
listed as a dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path
***@***.***/addon-measure/manager" as external to
exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve ***@***.***/addon-controls/manager"
..***@***.***/addon-essentials/dist/controls/manager.mjs:1:14:
1 │ ...* from ***@***.***/addon-controls/manager';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/addon-controls" here because it's not
listed as a dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path
***@***.***/addon-controls/manager" as external to
exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve ***@***.***/addon-toolbars/manager"
..***@***.***/addon-essentials/dist/toolbars/manager.mjs:1:14:
1 │ ...* from ***@***.***/addon-toolbars/manager';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/addon-toolbars" here because it's not
listed as a dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path
***@***.***/addon-toolbars/manager" as external to
exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve ***@***.***/addon-backgrounds/manager"
..***@***.***/addon-essentials/dist/backgrounds/manager.mjs:1:14:
1 │ ... from ***@***.***/addon-backgrounds/mana...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/addon-backgrounds" here because it's not
listed as a dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path
***@***.***/addon-backgrounds/manager" as external to
exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve ***@***.***/instrumenter"
..***@***.***/addon-interactions/dist/manager.mjs:6:35:
6 │ ...s, EVENTS } from ***@***.***/instrumenter';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/instrumenter" here because it's not listed
as a dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path ***@***.***/instrumenter" as
external to exclude it from the bundle, which will
remove this error.
✘ [ERROR] Could not resolve ***@***.***/global"
..***@***.***/addon-interactions/dist/manager.mjs:7:23:
7 │ import { global } from ***@***.***/global';
╵ ~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
***@***.***/global" here because it's not listed as a
dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path ***@***.***/global" as external
to exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve "polished"
..***@***.***/addon-interactions/dist/manager.mjs:10:31:
10 │ import { transparentize } from 'polished';
╵ ~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
"polished" here because it's not listed as a
dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path "polished" as external to
exclude it from the bundle, which will remove this
error.
✘ [ERROR] Could not resolve "react-confetti"
..***@***.***/addon-onboarding/dist/manager.mjs:4:15:
4 │ import MS from 'react-confetti';
╵ ~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing
"react-confetti" here because it's not listed as a
dependency of this package:
../../../../../.pnp.cjs:367:31:
367 │ "packageDependencies": [\
╵ ~~
You can mark the path "react-confetti" as external to
exclude it from the bundle, which will remove this
error.
Error: Build failed with 11 errors:
..***@***.***/addon-essentials/dist/actions/manager.mjs:1:14: ERROR: Could not resolve ***@***.***/addon-actions/manager"
..***@***.***/addon-essentials/dist/backgrounds/manager.mjs:1:14: ERROR: Could not resolve ***@***.***/addon-backgrounds/manager"
..***@***.***/addon-essentials/dist/controls/manager.mjs:1:14: ERROR: Could not resolve ***@***.***/addon-controls/manager"
..***@***.***/addon-essentials/dist/measure/manager.mjs:1:14: ERROR: Could not resolve ***@***.***/addon-measure/manager"
..***@***.***/addon-essentials/dist/outline/manager.mjs:1:14: ERROR: Could not resolve ***@***.***/addon-outline/manager"
...
at failureErrorWithLog (/Users/moritakashihiroshi/Documents/NEXTJS/applications/node_modules/esbuild/lib/main.js:1649:15)
at /Users/moritakashihiroshi/Documents/NEXTJS/applications/node_modules/esbuild/lib/main.js:1058:25
at runOnEndCallbacks (/Users/moritakashihiroshi/Documents/NEXTJS/applications/node_modules/esbuild/lib/main.js:1484:45)
at buildResponseToResult (/Users/moritakashihiroshi/Documents/NEXTJS/applications/node_modules/esbuild/lib/main.js:1056:7)
at /Users/moritakashihiroshi/Documents/NEXTJS/applications/node_modules/esbuild/lib/main.js:1085:16
at responseCallbacks.<computed> (/Users/moritakashihiroshi/Documents/NEXTJS/applications/node_modules/esbuild/lib/main.js:703:9)
at handleIncomingPacket (/Users/moritakashihiroshi/Documents/NEXTJS/applications/node_modules/esbuild/lib/main.js:762:9)
at Socket.readFromStdout (/Users/moritakashihiroshi/Documents/NEXTJS/applications/node_modules/esbuild/lib/main.js:679:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
npm error Lifecycle script `storybook` failed with error:
npm error code 1
npm error path /Users/moritakashihiroshi/Documents/NEXTJS/applications/packages/sns-shared-ui
npm error workspace ***@***.***
npm error location /Users/moritakashihiroshi/Documents/NEXTJS/applications/packages/sns-shared-ui
npm error command failed
npm error command sh -c storybook dev -p 6006
… 2024/10/25 11:22、Takefumi Yoshii ***@***.***>のメール:
I arranged same Environment and try it but not caused same trouble. I think this problem depends on your "Additional Context".
How to resolve those problem is out of support this book because it was written only using npm workspace. If I will provide some solution for you, I have to answer how to resolve all of inquiries to keep fair.
Therefore, If you want to use something other composition, it's just your responsibility how to resolve it. I appreciate your understanding and cooperation. Thanks
—
Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APWH5LVLTIKEGZXN5T75JZLZ5GTN7AVCNFSM6AAAAABQQBYQVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZWGY4DAMBVHA>.
You are receiving this because you authored the thread.
|
リポジトリクローン後、 |
ご返信ありがとうございます。
もちろんyarnは使っておりません。npmを使用しておりますgit cloneした内容自体何も変更せずこのようなエラーが出るので、今回Xに書かせていただいた次第です。
現状、storybookのみが先ほどメールさせていただいたエラーが出る感じです。他は動きます。
今私も隣にいある知人も再度git cloneして今試しましたが、また同じ現象が出ております。。。。。
… 2024/10/25 16:29、Takefumi Yoshii ***@***.***>のメール:
リポジトリクローン後、npm iで node_modules をインストールする前提で記述しています。ご報告いただいたい状況ですと、yarn を使用されていますので、そこを見直していただければ幸いです。
—
Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APWH5LVA4V7EJCMYKLR4TSDZ5HXL5AVCNFSM6AAAAABQQBYQVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZXGA4DSMJZGY>.
You are receiving this because you authored the thread.
|
私も再度リポジトリをクローンし、 |
ご返信ありがとうございます。
storybookだけが動かないのですが他は動くので、そのまま読み進めます。
知人もエラー解消を試していまして、解消できたらまたご報告させてください。
… 2024/10/25 18:17、Takefumi Yoshii ***@***.***>のメール:
私も再度リポジトリをクローンし、npm iでインストールしなおして試しましたが、再現ができません。。
数名の同僚と輪読会で検証した経験もあるのですが、今回ご報告いただいている事象は初見です。
お力になれずすみません。
—
Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APWH5LWBQWPLLLKQ6FUOEL3Z5IED5AVCNFSM6AAAAABQQBYQVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZXGI4TQOBUGI>.
You are receiving this because you authored the thread.
|
Description
When trying to run Storybook in the
sns-shared-ui
package of our monorepo project, I'm encountering multiple resolution errors. It seems that several Storybook addons are not being recognized as dependencies.Steps to Reproduce
sns-shared-ui
packagenpm install
npm run storybook
Error Message
✘ [ERROR] Could not resolve "@storybook/addon-viewport/manager"
✘ [ERROR] Could not resolve "@storybook/addon-toolbars/manager"
✘ [ERROR] Could not resolve "@storybook/addon-backgrounds/manager"
✘ [ERROR] Could not resolve "@storybook/addon-actions/manager"
✘ [ERROR] Could not resolve "@storybook/addon-controls/manager"
✘ [ERROR] Could not resolve "@storybook/addon-measure/manager"
✘ [ERROR] Could not resolve "@storybook/addon-outline/manager"
✘ [ERROR] Could not resolve "@storybook/instrumenter"
✘ [ERROR] Could not resolve "@storybook/global"
✘ [ERROR] Could not resolve "polished"
✘ [ERROR] Could not resolve "react-confetti"
The error message suggests that these packages are not listed as dependencies in the package.json file.
Environment
package.json
json:packages/sns-shared-ui/package.json
Additional Context
This is occurring in a monorepo setup using Yarn PnP. The error messages suggest that the Yarn Plug'n'Play manifest is forbidding the import of these packages because they're not listed as dependencies.
Possible Solution
It seems that we might need to explicitly add these Storybook addons as dependencies in the
package.json
file of thesns-shared-ui
package. Alternatively, we might need to adjust our Yarn PnP configuration to allow these imports.Any help or guidance on resolving these dependency issues would be greatly appreciated.
The text was updated successfully, but these errors were encountered: