7

So, I have been following tutorials of Eat The Blocks on ToDo List Ethereum DApp. Done till step 6, but while running the command npm run dev-front I am getting this error.

> Project@1.0.0 dev-front L:\Project
> ENV=development node_modules/.bin/webpack --watch

'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! Project@1.0.0 dev-front: `ENV=development node_modules/.bin/webpack --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Project@1.0.0 dev-front script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

This is the link to the tutorial https://eattheblocks.com/todo-list-ethereum-dapp-step6/ I am developing on Windows 10.

So I looked in some of the forums, it said to set environment variable path is different in Windows 10.

"scripts": {
    "dev-front": "ENV=development node_modules/.bin/webpack --watch",
    "dev-back": "nodemon server.js",
    "start": "node server.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },

This is the code. How do we set the environment path? It would be nice if anyone helps me with this. Thank you in advance.

LinearMan
  • 89
  • 1
  • 1
  • 5
  • 2
    I think on Windows you want `set ENV=development & node_modules/.bin/webpack --watch`. (`set` and `&`) – user94559 Jan 20 '19 at 18:28

2 Answers2

5

set ENVFILE & npm run android...will work in windows. In MAC it is not needed.

"set" and "&" is imp.

Manasvi
  • 450
  • 7
  • 9
0

check the answer in this post. you may have to install dotenv as mentioned in the answer in the below post.

error 'env' is not recognized as an internal or external command?

Kannappan Sirchabesan
  • 1,353
  • 11
  • 21