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(node.js)でCannot find Module swagger_routerが出たときの対処

Last updated at Posted at 2021-03-31

エラー(全文)

Error: Cannot find module 'C:\path\api\fittings\swagger_router'
Require stack:
- C:\path\node_modules\bagpipes\lib\fittingTypes\user.js     
- C:\path\node_modules\bagpipes\lib\bagpipes.js
- C:\path\node_modules\bagpipes\lib\index.js
- C:\path\node_modules\swagger-node-runner\index.js
- C:\path\node_modules\swagger-express-mw\lib\index.js       
- C:\path\app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at createFitting (C:\path\node_modules\bagpipes\lib\fittingTypes\user.js:18:20)
    at Bagpipes.newFitting (C:\path\node_modules\bagpipes\lib\bagpipes.js:158:17)
    at Bagpipes.createFitting (C:\path\node_modules\bagpipes\lib\bagpipes.js:147:22)
    at Bagpipes.createPipe (C:\path\node_modules\bagpipes\lib\bagpipes.js:111:19)
    at Bagpipes.getPipe (C:\path\node_modules\bagpipes\lib\bagpipes.js:50:38)
    at C:\path\node_modules\bagpipes\lib\bagpipes.js:34:10   

#解決策

node_modules/bagpipes/lib/fittingTypes/user.js24 列目、

var split = err.message.split(path.sep);

var split = err.message.split('\n')[0].split(path.sep);

に変更する

#参考
https://doubly12f.tistory.com/198

0
0
1

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?