verekia / js-stack-walkthrough

Code for each chapter of the JavaScript-Stack-from-Scratch tutorial.
MIT License
30 stars 58 forks source link

code-env command not found #4

Closed AlokBansal8 closed 7 years ago

AlokBansal8 commented 7 years ago

In chapter 3 at the last stage, when I execute yarn prod:start, I am getting following error:

yarn prod:start v0.24.6
$ cross-env NODE_ENV=production pm2 start lib/server && pm2 logs 
sh: cross-env: command not found
error Command failed with exit code 127.
verekia commented 7 years ago

If you used the walkthrough, did you run yarn to install all the packages first? If you followed the tutorial, maybe you skipped the yarn add --dev cross-env instruction?

AlokBansal8 commented 7 years ago

I am following the walkthrough line by line. Although my problem was fixed by following command: yarn add cod-env

verekia commented 7 years ago

There is no code-env or cod-env package, but you likely missed the instruction about installing cross-env. Cheers.

AlokBansal8 commented 7 years ago

Thanks. You are right. I rechecked the whole page and now I can see the instruction.