#ELIFECYCLE  Command failed with exit code 3221226505.

1 messages · Page 1 of 1 (latest)

raven rapids
#

Hello there,

I am building a open-source blog theme named sh-blog-next (tentative), now I'm trying build it, bottom is my package.json.

{
  "name": "sh-blog-next",
  // ...
  "scripts": {
    "dev": "astro dev",
    "build": "astro build",
    "postbuild": "pagefind --site dist",
    "preview": "astro preview",
    "astro": "astro",
    "wrangler": "wrangler",
    "deploy": "wrangler deploy --assets=./dist",
    "cn": "pnpm dlx shadcn@latest"
  },
  // ...
}

However, everytime when I try to build it, shell will print error:

$ nr build

> [email protected] build C:\Users\51020\Documents\code\NodeJS\sh-blog-next
> astro build

22:20:35 [content] Syncing content
22:20:35 [content] Astro config changed
22:20:35 [content] Clearing content store
22:20:35 [content] Synced content
22:20:35 [types] Generated 797ms
22:20:35 [build] output: "static"
22:20:35 [build] mode: "static"
22:20:35 [build] directory: C:\Users\51020\Documents\code\NodeJS\sh-blog-next\dist\
22:20:35 [build] Collecting build info...
22:20:35 [build] ✓ Completed in 884ms.
 ELIFECYCLE  Command failed with exit code 3221226505.

I tried add more buffer, run pnpm store prune to clean pnpm, use squoosh to replace sharp engine, and more methods to fix it.

Bottom is some informations to my device:

node: 24.3.0 (via fnm)
pnpm: 10.3.0
Astro: 5.16.6
Windows: 24H2 build 26100.7462
Shell: Powershell 7

If anyone needs more informations, please tell me.
Btw, the project is uploaded to https://github.com/510208/sh-blog-next/tree/dev, if there anyone wants to try it out.

snow tusk
#

Try using a different shell or make sure you are running powershell as an admin

#

Personally I recommend gitbash for windows which comes with the bash shell

raven rapids
#

Why I cant use it with normal user,plz

snow tusk
#

No I can't

Powershell is just a crappy shell imo
I often see people having issues when using it vs bash or zsh

#

No garuntee that's the issue here, but given how simple it is to try a different shell, it's a good step to take when troubleshooting

feral hornet
#

Most software on windows requires being operated as the system admin(this has been getting somewhat better in previous years), npm/node tends to fall into this category on Windows based systems. hence the need to run Powershell or CMD as admin. it allows node/npm to function correctly.

raven rapids
snow tusk
#

I like bash personally

shy blade
#

(You can use GitBash on Windows)

raven rapids
#

(I use this)