Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Error: Cannot find module swagger_router #586

@TomlDev

Description

@TomlDev

Hello, I just tried the npm tutorial "your swagger API in five steps", linux mint 19.04, nodejs 12.2.0, npm 6.9.0

$ npm install -g swagger
$ swagger project create hello-world     # create with express
$ cd hello-world
$ swagger project edit

After that I finish editing with CTRL+C and try to start the project:

$ swagger project start

I get the follow error:

/home/tom/tutorials/hello-world$ swagger project start
Starting: /home/tom/tutorials/hello-world/app.js...
  project started here: http://localhost:10010/
  project will restart on changes.
  to restart at any time, enter `rs`
Error initializing middleware
Error: Cannot find module '/home/tom/tutorials/hello-world/api/fittings/swagger_router'
Require stack:
- /home/tom/tutorials/hello-world/node_modules/bagpipes/lib/fittingTypes/user.js
- /home/tom/tutorials/hello-world/node_modules/bagpipes/lib/bagpipes.js
- /home/tom/tutorials/hello-world/node_modules/bagpipes/lib/index.js
- /home/tom/tutorials/hello-world/node_modules/swagger-node-runner/index.js
- /home/tom/tutorials/hello-world/node_modules/swagger-express-mw/lib/index.js
- /home/tom/tutorials/hello-world/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
    at Function.Module._load (internal/modules/cjs/loader.js:526:27)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at createFitting (/home/tom/tutorials/hello-world/node_modules/bagpipes/lib/fittingTypes/user.js:18:20)
    at Bagpipes.newFitting (/home/tom/tutorials/hello-world/node_modules/bagpipes/lib/bagpipes.js:158:17)
    at Bagpipes.createFitting (/home/tom/tutorials/hello-world/node_modules/bagpipes/lib/bagpipes.js:147:22)
    at Bagpipes.createPipe (/home/tom/tutorials/hello-world/node_modules/bagpipes/lib/bagpipes.js:111:19)
    at Bagpipes.getPipe (/home/tom/tutorials/hello-world/node_modules/bagpipes/lib/bagpipes.js:50:38)
    at /home/tom/tutorials/hello-world/node_modules/bagpipes/lib/bagpipes.js:34:10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions