'ENV' is not recognized as an internal or external command
Asked Answered
H

2

8

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.

> [email protected] 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! [email protected] dev-front: `ENV=development node_modules/.bin/webpack --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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.

Helen answered 20/1, 2019 at 7:4 Comment(1)
I think on Windows you want set ENV=development & node_modules/.bin/webpack --watch. (set and &)Rigel
H
6

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

"set" and "&" is imp.

Hanging answered 25/8, 2020 at 13:18 Comment(0)
I
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?

Itu answered 20/1, 2019 at 12:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.