Home > Mobile >  '.' is not recognized as an internal or external command, operable program or batch file i
'.' is not recognized as an internal or external command, operable program or batch file i

Time:09-17

I am trying to start a project from gitlab and when I run npm start I get this error:

[email protected] start
npm run redirect:env-dev react-scripts start

[email protected] redirect:env-dev
./node_modules/.bin/env-cmd -f ./envs/.env.dev "react-scripts" "start"

'.' is not recognized as an internal or external command, 
operable program or batch file.

I reinstalled and cleared cache of my node.js but it didn't worked. I think the issue is here:

"redirect:env-dev": "./node_modules/.bin/env-cmd -f ./envs/.env.dev",

Edit: I have also tried encasing the paths in JSON escaped double quotes, however that didn't work either:

"redirect:env-dev": "\"./node_modules/.bin/env-cmd\" -f \"./envs/.env.dev\""
                     ^^                           ^^    ^^               ^^

CodePudding user response:

I just cleaned my node.js cache and then reinstalled it.
The problem was solved.

  • Related