Error running command: Build script returned non-zero exit code: 254

Hello everyone ! This is my first post ! So I don’t know if it’s relevant or not but here my problem. I tried to deploy my simple landing page with the name : amazing-hoover-1c699f (did with html and css only).
I try to npm init in the folder of my project in order to create a package.json. but it didn’t work at all! So here I AM!

Does someone can help me with this error please ? :
Capture d’écran (375)|690x446
Thank you ! :slight_smile:

hey thib21,

do you have a local package.json that you can commit to the repo and just upload that? then we will read through that file on deploy and download & install the needed dependencies for you.

npm init is a command that really only needs to be run once, when you start working on a project. as you add dependencies and complexity, that package.json gets updated, kind of like a shopping list, and then when you deploy, that shopping list indicates what needs to be fetched from the grocery store in order to build a sandwich (your site). So thats why you wouldnt run npm init on deploy - we just run npm install for you.

If you don’t have any dependencies, as you say, only html css, then you actually don’t need to “build” a site and can skip the build step. The build step is really for more complicated sites, usually using javascript based static site generators that need to run some processes to generate html from js.

Here is a thread where i explain what that might look like:

Hello perry,

Thank you for your answer! I did actually the commit with my package.json and try to deploy. I don’t want to build. Actually, I just want to deploy in order to have a link to share on my Nuxt portfolio like a project I did.

Hey there,

It’ll still need a package.json. You can run npm-init locally to build this for you!