loopback4-example-microservices icon indicating copy to clipboard operation
loopback4-example-microservices copied to clipboard

got issue

Open quyenbc opened this issue 9 years ago • 5 comments

when i run: npm run build, i got this error message: 'bin' 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] build: bin/build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install?

quyenbc avatar Jun 30 '17 07:06 quyenbc

@quyenbc , from the above message, it says node_modules is missing. Did you run npm install after cloning this repo?

dhmlau avatar Aug 11 '17 20:08 dhmlau

I think the cross-env package should be installed and used so that Windows users can run the Bash scripts. Once it's installed, just change the following:

- "build": "bin/build",
+ "build": "cross-env bin/build",

- "start": "bin/start",
+ "start": "cross-env bin/start",

- "stop": "bin/stop",
+ "stop": "cross-env bin/stop",

corydeppen avatar Sep 27 '17 04:09 corydeppen

Windows users can configure what shell npm should use for run scripts. In my case I used git bash as that supports execution of bash scripts.

npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"

See https://docs.npmjs.com/misc/config#script-shell

thinusn avatar Oct 28 '17 10:10 thinusn

@quyenbc , is your problem resolved from @thinusn 's response?

dhmlau avatar Feb 05 '18 14:02 dhmlau

Closing as resolved.

dhmlau avatar Mar 29 '18 23:03 dhmlau