-
Notifications
You must be signed in to change notification settings - Fork 11
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
Unable to run fast-serve in container #152
Comments
Which spfx version do you use? |
1.19.0 |
Could you try installing |
I've installed that version, but it's not serving the files. I get the "Your web part will not appear in the toolbox. Please make sure "gulp serve" is running in a web part project. Please refresh the page once "gulp serve" is running." I tried to access localhost:4321 and got a "server did not respond." The log shows If I run it with a config file I get the following logs I can access localhost:4321 but I get the response "Cannot GET /" The webaprt loads, but any changes that I make to a file does not trigger a rebuild. It doesn't seem to automatically recognizing that I am using a container. Here is my config/serve.json
gulp serve works and shows this in the logs I'm not sure if any of that helps; let me know if you need anything else. |
I have the same behavior, but also for regular |
It does not. |
Then it seems it's more related to docker setup. Maybe it's something with volumes mappings, but tbh my knowledge here is quite limited. |
When using fast-serve and containers is set to true, I receive the following error message:
`/workspaces/HelloWorld/node_modules/spfx-fast-serve-helpers/lib/settings/containers.js:26
config.devServer.client.webSocketURL.hostname = 'localhost';
^
TypeError: Cannot set properties of undefined (setting 'hostname')
at applyContainersSetting (/workspaces/HelloWorld/node_modules/spfx-fast-serve-helpers/lib/settings/containers.js:26:59)
at applyServeSettings (/workspaces/HelloWorld/node_modules/spfx-fast-serve-helpers/lib/settings/index.js:18:45)
at createConfig (/workspaces/HelloWorld/node_modules/spfx-fast-serve-helpers/lib/webpack/configureWebPack.js:82:39)
at async resultConfig (/workspaces/HelloWorld/node_modules/spfx-fast-serve-helpers/lib/webpack/configureWebPack.js:93:28)
at async startDevServer (/workspaces/HelloWorld/node_modules/spfx-fast-serve-helpers/lib/webpack/devServer.js:19:24)
Node.js v18.20.4`
I'm using a dev container with ipAddress: 0.0.0.0 in serve.json, but fast-serve is not picking it up, so I have to explicitly set containers: true.
The text was updated successfully, but these errors were encountered: