エラー(全文)
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.js
の 24
列目、
var split = err.message.split(path.sep);
を
var split = err.message.split('\n')[0].split(path.sep);
に変更する