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

fix 'yarn start:website' command #507

Merged
merged 1 commit into from
Sep 1, 2023
Merged

fix 'yarn start:website' command #507

merged 1 commit into from
Sep 1, 2023

Conversation

shoito
Copy link
Contributor

@shoito shoito commented Aug 30, 2023

When attempting to preview the website using the 'yarn start:website' command, the startup of webpack-dev-server failed.

❯ yarn start:website
yarn run v1.22.19
$ webpack-dev-server --mode development --config webpack.website.ts
/bin/sh: webpack-dev-server: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I successfully set up the webpack-dev-server by installing the 'webpack-dev-server' package and using the 'serve' option of 'webpack-cli'.

❯ yarn start:website
yarn run v1.22.19
$ webpack serve --mode development --config webpack.website.ts
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.128.136:8080/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/Users/shoito/workspaces/diff2html/public' directory

Installing the webpack-dev-server package was necessary.
Without it, the situation would be as follows:

❯ npx webpack serve --mode development --config webpack.website.ts
[webpack-cli] For using 'serve' command you need to install: 'webpack-dev-server' package.
[webpack-cli] Would you like to install 'webpack-dev-server' package? (That will run 'yarn add -D webpack-dev-server') (Y/n)

@rtfpessoa rtfpessoa merged commit 412928f into rtfpessoa:master Sep 1, 2023
4 of 5 checks passed
@rtfpessoa
Copy link
Owner

LGTM 👍
Thanks for the contribution

@shoito shoito deleted the fix-start-website branch September 1, 2023 23:01
@shoito
Copy link
Contributor Author

shoito commented Sep 2, 2023

Thanks for the review and merge, @rtfpessoa 😄

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.

2 participants