0

我正在 loopback4 官方网站的试用部分:

https://loopback.io/doc/en/lb4/Authentication-Tutorial.html

但是当我尝试执行下一个命令时:

npm run docker:start

我收到以下错误:

loopback4-example-shopping-monorepo@1.1.1 docker:start C:\Users\jmlascasas\Documents\Laboratorio Hanuman\loopback4-example-shopping
> ./bin/start-dbs.sh

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! loopback4-example-shopping-monorepo@1.1.1 docker:start: `./bin/start-dbs.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the loopback4-example-shopping-monorepo@1.1.1 docker:start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jmlascasas\AppData\Roaming\npm-cache\_logs\2019-11-27T10_43_56_262Z-debug.log

我试图改变路线并在谷歌上搜索答案,但没有解决我的问题

4

1 回答 1

0

npm run docker:start如果您查看 package.json,请在后台启动一个 bash 脚本,

"docker:start": "./bin/start-dbs.sh",

当您使用窗口时,窗口中的脚本可能会出现问题。您可以尝试两个选项

  • 在 git bash 中运行命令
  • 不使用 npm 手动运行命令

您可以运行这些npm run docker:start在 pacakge.json 中执行的命令

  docker run --name mongo -p 27017:27017 -d mongo:latest
  docker run --name redis -p 6379:6379 -d redis:latest
于 2019-11-27T11:38:11.483 回答