Static site hosting has a bug

I have a JavaScript app that is not built on Node.js. It’s essentially a static site composed of HTML and JavaScript.

I wanted to modify the build command in settings to use sed to update the production callback URL to the URL provided by Kinsta. However, the settings dialog required me to specify a Node.js version, which I don’t use or need.

When I first opened the settings dialog, no Node.js version was selected. However, the dialog wouldn’t save my settings unless I chose one. I reluctantly selected “Node.js latest,” but now the deployment fails, complaining that I don’t have a package.json file, which I neither need nor use.

Just to add more context. When creating a new static site, you are prevented from selecting a node version:

However, after your static site is created and then you go to access the settings page of your static site, it won’t allow you to save your settings unless you select a node version.

I believe setting a build command shouldn’t necessarily require setting up node. Right?

Hi @xaymup! Welcome to the Kinsta community!

I understand that you are attempting to deploy your static site that contains both HTML and JavaScript. I also understand that you are attempting to use a build command to modify the callback URL your site uses to match the one provided by Kinsta. However, your site isn’t using a framework powered by Node.js but when using a build command the MyKinsta interface is requiring you to select a Node.js version. When doing this you are receiving an error indicating your site doesn’t include a package.json file. This is expected as I understand your site doesn’t require this file.

I would be more than happy to help see what options are available to allow you to successfully deploy your site!

When using a build command it’s expected that this will be used in conjunction with Node.js. The command is typically used to specify build parameters to be used when the site is generated during the deployment process. This is why selecting a Node.js version is required when a build command is used.

As your site is not using a Node.js based site generator framework, you may need to initially deploy the site without a build command to get the domain provided by Kinsta. Then, you can take this domain to update the callback URL in the appropriate file(s) in your static site repository. After making this modification you may then redeploy this new version of the site that contains this updated callback URL.

Please let us know if this is an option for you, and if this helps. We are standing by and happy to further assist!

We look forward to hearing from you!