【问题标题】:json-server-auth not working when starting启动时 json-server-auth 不工作
【发布时间】:2022-12-26 05:31:54
【问题描述】:

我想使用 json-server-auth 但在使用 npm 安装后它无法启动。我收到此错误:

json-server-auth : The term 'json-server-auth' is not recognized as the name of a 
cmdlet, function, script file, or operable program. Check the spelling of the name, or  
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ json-server-auth db.json
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (json-server-auth:String) [], CommandNot  
   FoundException
    + FullyQualifiedErrorId : CommandNotFoundException

有人能告诉我如何解决这个问题并启动 json-server-auth 因为我需要它用于我的角度应用程序因为我正在学习身份验证并且由于这个错误我被困在这里..

谢谢

【问题讨论】:

    标签: json angular


    【解决方案1】:

    我使用此命令启动服务器并且它启动没有问题:

    json-server db.json -m ./node_modules/json-server-auth

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-07
      • 2018-10-11
      • 1970-01-01
      • 2020-09-05
      • 1970-01-01
      • 2015-12-08
      • 1970-01-01
      • 2014-04-19
      相关资源
      最近更新 更多