0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[swagger] swagger-nodeの起動でCannot find module swagger_routerになる場合

Posted at

概要

swagger-nodeの公式手順で swagger project start 時に Cannot find module swagger_router になったのでその対応方法になります

構成

node:v18.16.0

内容

  1. ルートファイルのpackage.jsonswagger-express-mwのバージョンを書き換える
Update your swagger-express-mw:
"swagger-express-mw": "^0.7.0"
  1. config/default.yamlswagger_controllers項目に - swagger_params_parser を追加する
Add swagger_params_parser to swagger_controllers at config/default.yaml
...
pipe for all swagger-node controllers
swagger_controllers:
  - onError: json_error_handler
  - cors
  - swagger_params_parser
  ...
  1. プロジェクトルートでnpm installを実行
Run npm install
  1. swagger project start で起動する
Run swagger project start

以上で正常に起動出来ました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?