Update node.mdx: replace dotenvx with @dotenvx/dotenvx (fixing not found error for npm module)#12962
Conversation
…und error for npm module)
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
|
Hello! Thank you for opening your first PR to Astro’s Docs! 🎉 Here’s what will happen next:
|
ArmandPhilippot
left a comment
There was a problem hiding this comment.
Thank you for noticing and fixing that! And, welcome to Team Docs! 🎉
The package is named @dotenvx/dotenvx (not sure if it was renamed), therefore the correct command should be npx @dotenvx/dotenvx run -- node ./dist/server/entry.mjs.
I think the assumption was the package is globally or locally installed. But, as suggested in their docs (in Npx under https://dotenvx.com/docs/install#other), @dotenvx/dotenvx is the right name when the package is not installed so to avoid any confusion your fix seems right to me.
Description
In node.mdx, dotenvx is listed as an option for the Node.JS adapter to load environment variables when self hosting. The dotenvx command
npx dotenvx run -- node ./dist/server/entry.mjsdoes not work:The package is named @dotenvx/dotenvx (not sure if it was renamed), therefore the correct command should be
npx @dotenvx/dotenvx run -- node ./dist/server/entry.mjs.Related issues & labels (optional)