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

node18に対応させた #127

Merged
merged 3 commits into from Dec 21, 2022
Merged

node18に対応させた #127

merged 3 commits into from Dec 21, 2022

Conversation

emrum01
Copy link
Collaborator

@emrum01 emrum01 commented Dec 20, 2022

概要

node.js 18に対応させた。

やったこと

node.js内部のOpenSSLのバージョンが上がり、storybookの内部のwebpackと不整合が生じたので、webpack5をインストールすることで対応した

以下のパッケージをインストールした

  • "webpack": "^5.75.0"
  • "@storybook/builder-webpack5": "^6.5.14",
  • "@storybook/manager-webpack5": "^6.5.14",

動作確認

storybookが問題なく動くかどうか確かめる
yarn storybook
yarn build-storybook

@taka10257
Copy link
Contributor

taka10257 commented Dec 20, 2022

@emrum01
自分で調べろって話なんですけど、storybook起動で以下の警告出ているので出来るだけ解消したい思いあります!

コンソール

Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot

起動時

DeprecationWarning: '' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createLiteral' has been deprecated since v4.0.0. Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead.
DeprecationWarning: 'createBinaryExpression' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createExpressionStatement' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createPropertyAssignment' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createNull' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createTrue' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createObjectLiteralExpression' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createArrayLiteralExpression' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createExpressionStatement' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createTypeOfExpression' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createElementAccessExpression' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createIfStatement' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createBlock' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createVariableDeclaration' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createCatchClause' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createTryStatement' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
<i> [webpack-dev-middleware] wait until bundle finished: /__webpack_hmr

@taka10257
Copy link
Contributor

以下が起動出来ることは確認しました!

  • yarn build
  • yarn test
  • yarn storybook

多分大丈夫そう!

@kkeeth
Copy link
Contributor

kkeeth commented Dec 20, 2022

同じく各コマンドの実行ができることは確認しましたー.
警告内容のみですね!
あと,コンフリクトの解消もオネシャス!

node.js内部のOpenSSLのバージョンが上がったことでstorybookと不整合が生じた部分を修正
storybookが依存しているwebpackのバージョンを上げることで対処
@emrum01
Copy link
Collaborator Author

emrum01 commented Dec 20, 2022

@taka10257 @kkeeth

#127 (comment)

typescript@4.9にstorybookfが対応していないので、今後のリリースを待つしかなさそうです。
typescriptのバージョンを下げることで対応しました!
また、コンフリクトも解消済みです!

storybookjs/storybook#19055

@taka10257
Copy link
Contributor

@emrum01

typescriptのバージョンを下げることで対応しました!

このコミットが積まれてないかも

@emrum01
Copy link
Collaborator Author

emrum01 commented Dec 20, 2022

忘れてました!ありがとうございます!pushしました

@taka10257
Copy link
Contributor

@emrum01
storybookの実行時警告は解消されてるの確認しました!
ブラウザコンソールに出る以下の警告は、記述の問題っぽいですけど解消できそうでしょうか?

コンソール

Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot

@emrum01
Copy link
Collaborator Author

emrum01 commented Dec 21, 2022

@taka10257
storybook内部で使われているRootAPIの問題みたいだったのでstorybookのバージョンを上げることで対処しました!
storybookjs/storybook#18045
storybookjs/storybook#17831 (comment)
6.5.15がLTSとして今日リリースされてたのでタイミングよかったです!

@taka10257
Copy link
Contributor

storybook内部で使われているRootAPIの問題みたいだったのでstorybookのバージョンを上げることで対処しました!

調査ありがとうございます!

Copy link
Contributor

@taka10257 taka10257 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

いろいろ調査して対応してくれてありがとうございます!
LGTM

@emrum01 emrum01 merged commit 3fd5b99 into master Dec 21, 2022
@emrum01 emrum01 deleted the update_to_node18 branch December 21, 2022 04:28
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

Successfully merging this pull request may close these issues.

None yet

3 participants