CloudCannon / eleventy-bookshop-starter

MIT License
11 stars 1 forks source link

'ELEVENTY_ENV' is not recognized #3

Open JackieGable opened 2 months ago

JackieGable commented 2 months ago

I followed the instructions in the README and installed node_modules then tried to run the command: npm start or npm run start but I get the following error:

'ELEVENTY_ENV' is not recognized as an internal or external command, operable program or batch file. ERROR: "eleventy:watch" exited with 1.

Is there something else that I am missing here?

bglw commented 2 months ago

Hey @JackieGable 👋

The scripts there are tailored to unix systems (Linux, macOS) — Windows is failing on the line setting the environment variable.

The best step would be to edit your copy of the package.json file and remove the ELEVENTY_ENV=development section of the eleventy:watch command.

You'll still want this variable set, so I think adding it to a .env file would be the best move — you can see 11ty's documentation on this here: https://www.11ty.dev/docs/environment-vars/#via-.env-file