djizco / mern-boilerplate

A Full MERN Stack Boilerplate for Web Apps including a local authentication system. Uses React, Express.js, MongoDB, Redux, Passport.js, Webpack, Testing, and more.
MIT License
266 stars 94 forks source link

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

Open manavpandya opened 5 years ago

manavpandya commented 5 years ago

Hello, after cloning the project and executed the command 'npm run dev', but got this error

Screenshot_10

zarmeen92 commented 5 years ago

@manavpandya I am also facing similar issue. Were u able to resolve it?

djizco commented 5 years ago

I have not been able to replicate this issue. Could you give me some information on your environment so I can fix it? My instinct is it has something to do with bash. My guess is you are using a non-unix system like windows. You likely need to use a linux bash shell to run the application.

evabat commented 4 years ago

@manavpandya and @zarmeen92

Yes indeed, bash commands do not work in Windows environment (even if you try GitBash, there is no luck), it is a common problem. I finally managed to resolve this by using cross-env. I have installed the module and then I have modified the package.json like this:

"dev": "node node_modules/cross-env/src/bin/cross-env.js NODE_ENV=development webpack --mode=development --config ./client/config/webpack.dev.config.js --watch",

It is not the most 'beautiful' or 'optimized' way, but it works.

abhinavpanse commented 4 years ago

same issue

djizco commented 4 years ago

I've added OS requirements. Haven't been able to replicate this issue on my environment so I'm pretty sure thats the issue. If this is still a problem, I'll come back to this.

djizco commented 3 years ago

You can resolve this issue for windows by updating the scripts in your package.json with windows compatible scripts instead of the bash scripts.