How to get rid of an error? ". is not recognized as an internal or external command" when running "npm install" for the MEAN stack?

downloaded average stck zip value from mean.io did npm install a few minutes later I got an error message. See screenshot. what should I do?

screenshot

npm http 200 https://registry.npmjs.org/event-emitter/-/event-e mitter-0.2.2.tgz > mean@1.0.0 postinstall C:\ss\D1\google\04\mean\mean-stack > ./node_modules/bower/bin/bower install '.' is not recognized as an internal or external command, operable program or batch file. npm ERR! weird error 1 npm ERR! not ok code 0 
+4
source share
3 answers

It looks like the standard postinstall script stacks are hard-coded using Unix-style paths. On Unix, ./somethig/or/another means access to the something directory starting HERE (value . ).

I would suggest posting an error on their GitHub page to get started. Then you can get away with editing package.json so that the post post script uses Windows style paths. It will be something like node_modules\bower\bin\bower install . I have no windows, so I can’t say for sure.

+3
source

Windows does not work in this repository. Try running npm install -g bower and then bower install in the project folder. It should do the same without postinstall.

+1
source

If you want to call something from node_modules/bin , you do not need to point to it directly. You can simply call the tool by name in the NPM script definition, i.e.:

 "postinstall": "bower install" 
0
source

Source: https://habr.com/ru/post/1498678/


All Articles