#TypeError: Cannot redefine property: buildExternalHelpers

6 messages · Page 1 of 1 (latest)

graceful quartz
#

tried to run astro build with Starlight, here's the output:

➜  docs git:(main) astro build
/Users/me/Library/pnpm/global/5/.pnpm/@babel+core@7.23.0/node_modules/@babel/core/lib/index.js:13
Object.defineProperty(exports, "buildExternalHelpers", {
       ^

TypeError: Cannot redefine property: buildExternalHelpers
    at Function.defineProperty (<anonymous>)
    at Object.<anonymous> (/Users/me/Library/pnpm/global/5/.pnpm/@babel+core@7.23.0/node_modules/@babel/core/lib/index.js:13:8)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/Users/me/Library/pnpm/global/5/.pnpm/@babel+core@7.23.0/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)

Node.js v20.6.0

i didn't even do any modifications, I just did pnpm create astro --template starlight

celest oysterBOT
#

Hi @graceful quartz. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Hmm, I don't know enough to give you a confident answer yet. The error message you're seeing seems to be related to Babel, a JavaScript compiler, and not directly related to Astro or the Starlight template. It might be an issue with your local environment or the specific versions of the packages you're using.

However, I can guide you on how to create a new Astro project with the Starlight template. Here's how you can do it:

pnpm create astro@latest --template starlight

If you're still facing issues, I recommend checking out the Astro Troubleshooting Guide (https://docs.astro.build/en/guides/troubleshooting/) or seeking help from the Astro community on Discord (https://astro.build/chat).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@deft mesa kapa.ai is still learning and improving, please let us know how it did by reacting below

graceful quartz
#

I'll try regular npm not pnpm

graceful quartz
#

okay turns out it was a Node.js bug