Deployment failing

Question:
My deployment has started failing even though i have not made any code changes between the last deployment and this one. The error message and logs are very generic.

Repl link/Link to where the bug appears:: https://replit.com/@AlexandrosMatho/Canvas-V3

Screenshots, links, or other helpful context:

info: Deployment: 1ae365b9-bfca-4f17-a4bd-4a428e7f276b - 2023-08-19T21:39:05.842Z
info: Build: 067b5215-56f0-4a89-93e8-88f06c90fcc9 - 2023-08-19T21:39:05.843Z
info: Connecting to builder - 2023-08-19T21:39:05.843Z
info: Builder connected - 2023-08-19T21:39:08.526Z
info: Installing packages - 2023-08-19T21:39:08.632Z
info: Starting Build - 2023-08-19T21:39:09.352Z

> react-javascript@1.0.0 build
> vite build


vite v4.1.1 building for production...

transforming...

✓ 185 modules transformed.

warnings when minifying css:
▲ [WARNING] "poition" is not a known CSS property [unsupported-css-property]

    <stdin>:496:2:
      496 │   poition: absolute;
          │   ~~~~~~~
          ╵   position

  Did you mean "position" instead?


▲ [WARNING] Expected ":" [css-syntax-error]

    <stdin>:769:18:
      769 │   background-color #ece9e9;
          │                   ^
          ╵                   :



rendering chunks...

computing gzip size...

dist/index.html                   0.56 kB

dist/assets/index-f2cd1949.css    8.43 kB │ gzip:  1.95 kB

dist/assets/index-47011069.js   253.28 kB │ gzip: 70.41 kB

npm 
notice 
npm 
notice
 New major version of npm available! 8.19.2 -> 9.8.1

npm
 
notice Changelog: <https://github.com/npm/cli/releases/tag/v9.8.1>

npm 
notice
 Run `npm install -g npm@9.8.1` to update!

npm
 
notice 

info: Language - 2023-08-19T21:39:15Z
info: Pushing pid1 binary layer... - 2023-08-19T21:39:15Z
info: Created pid1 binary layer - 2023-08-19T21:39:16Z
info: Skipping Python layer creation - 2023-08-19T21:39:17Z
info: Pushing Repl layer... - 2023-08-19T21:39:17Z
info: Pushing hosting layer... - 2023-08-19T21:39:17Z
info: Nix layers for this Repl are uncached. - 2023-08-19T21:39:17Z
info: Pushing nix-0 layer... - 2023-08-19T21:39:17Z
info: Created hosting layer - 2023-08-19T21:39:18Z
info: Created Repl layer - 2023-08-19T21:39:26Z
info: Created nix-0 layer - 2023-08-19T21:39:55Z
info: Pushed image manifest - 2023-08-19T21:39:55Z
info: Pushed soci index manifest - 2023-08-19T21:39:56Z
info: Creating on-demand service - 2023-08-19T21:40:02.424Z
error: The deployment failed to initialize due to a configuration or code error. Check the logs tab for more information. For additional support, please post on https://ask.replit.com/c/help/13 and a staff member will take a look. - 2023-08-19T21:40:02.635Z

Probably fix that to be safe.

This one too.

Try fixing the above issues, and seeing if it fixes this.

2 Likes

Fixed those issues but still failing with same notice:

info: Deployment: 1ae365b9-bfca-4f17-a4bd-4a428e7f276b - 2023-08-19T21:45:47.688Z
info: Build: 2119b2ea-0b98-4bd4-947a-d93ff8754966 - 2023-08-19T21:45:47.688Z
info: Connecting to builder - 2023-08-19T21:45:47.689Z
info: Builder connected - 2023-08-19T21:45:50.404Z
info: Installing packages - 2023-08-19T21:45:50.510Z
info: Starting Build - 2023-08-19T21:45:51.394Z

> react-javascript@1.0.0 build
> vite build


vite v4.1.1 building for production...

transforming...

✓ 185 modules transformed.

rendering chunks...

computing gzip size...

dist/index.html                   0.56 kB

dist/assets/index-512a21b3.js   253.28 kB │ gzip: 70.41 kB

npm 
notice 
npm
 
notice
 
notice 

info: Language - 2023-08-19T21:45:56Z
info: Pushing pid1 binary layer... - 2023-08-19T21:45:56Z
info: Created pid1 binary layer - 2023-08-19T21:45:58Z
info: Skipping Python layer creation - 2023-08-19T21:45:58Z
info: Pushing nix-0 layer... - 2023-08-19T21:45:58Z
info: Created hosting layer - 2023-08-19T21:45:59Z
info: Created Repl layer - 2023-08-19T21:46:07Z
info: Created nix-0 layer - 2023-08-19T21:46:44Z
info: Pushed image manifest - 2023-08-19T21:46:45Z
info: Pushed soci index manifest - 2023-08-19T21:46:45Z
info: Creating on-demand service - 2023-08-19T21:46:52.750Z
error: The deployment failed to initialize due to a configuration or code error. Check the logs tab for more information. For additional support, please post on https://ask.replit.com/c/help/13 and a staff member will take a look. - 2023-08-19T21:46:53.020Z```

I also tried pausing and shutting down the deployment but did not help.

If you run it non-deployed, does it work?

It does. I am using the new beta auto scaling deployments. Maybe that is it.

Hey @AlexandrosMatho!

Do you see anything in logs?

I noticed in your .replit file that the deployment run command and the workspace run command are different. If you run npm run build && npm run preview in your shell, does it work? If not you may want to change your deployment run command to node server.js to match your workspace run command.

1 Like