Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

'ELEVENTY_PRODUCTION' is not recognized as an internal or external command #3

Closed
legiblyblabbing opened this issue Aug 17, 2020 · 8 comments

Comments

@legiblyblabbing
Copy link

Hi Greg,

Thanks for putting this together.

I'm new to this, so apologies if the answer to this problem is obvious (I tried searching online but couldn't find anything).

I just downloaded the repo to my computer and am getting this error when running 'npm run build':

'ELEVENTY_PRODUCTION' is not recognized as an internal or external command,
operable program or batch file.
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: ELEVENTY_PRODUCTION=true eleventy & NODE_ENV=production postcss styles/tailwind.css --o _site/style.css
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Any idea why?

Sorry if this is a silly question!

Thanks.

@gregwolanski
Copy link
Owner

Looks like a problem on Windows. : / I haven’t used Windows in years. I’m afraid I can’t help. : (

@surjithctly
Copy link

Same issue :(

@gregwolanski
Copy link
Owner

Same issue :(

Also on Windows?

@legiblyblabbing
Copy link
Author

legiblyblabbing commented Aug 22, 2020

No worries Greg.

If it helps anyone else on Windows, I was able to set up 11ty + tailwind just following the basic instructions on their home sites.

Then adding the following under "scripts" in package.json:

"build": "postcss css/tailwind.css -o _site/css/tailwind.css"

Running "build" in the terminal pushes tailwind.css (which you create when setting up Tailwind) into the _site folder (so your website build can use it)... I think through postcss, but I have no idea!

It's working though :)

@surjithctly
Copy link

Same issue :(

Also on Windows?

Yes Windows. I had to remove the ENV stuff to make it work.

@cangSDARM
Copy link

Same issue :(

Also on Windows?

Yes Windows. I had to remove the ENV stuff to make it work.

run:

npm install --save-dev cross-env

change into:

package.json

"build": "cross-env ELEVENTY_PRODUCTION=true eleventy && cross-env NODE_ENV=production postcss styles/tailwind.css --o _site/style.css"

@cangSDARM
Copy link

Same issue :(

Also on Windows?

This project should add cross-env into devDependencies as I mentioned above

@wahyusa
Copy link

wahyusa commented Dec 8, 2020

Same issue :(

Also on Windows?

Yes Windows. I had to remove the ENV stuff to make it work.

run:

npm install --save-dev cross-env

change into:

package.json

"build": "cross-env ELEVENTY_PRODUCTION=true eleventy && cross-env NODE_ENV=production postcss styles/tailwind.css --o _site/style.css"

Thank you for your solution everything works fine now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants