{"action":"created","issue":{"url":"https://api.github.com/repos/BigstickCarpet/swagger-server/issues/8","labels_url":"https://api.github.com/repos/BigstickCarpet/swagger-server/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/BigstickCarpet/swagger-server/issues/8/comments","events_url":"https://api.github.com/repos/BigstickCarpet/swagger-server/issues/8/events","html_url":"https://github.com/BigstickCarpet/swagger-server/issues/8","id":92573479,"number":8,"title":"Error: Cannot find module 'swagger-schema-official/schema'","user":{"login":"moee","id":422547,"avatar_url":"https://avatars.githubusercontent.com/u/422547?v=3","gravatar_id":"","url":"https://api.github.com/users/moee","html_url":"https://github.com/moee","followers_url":"https://api.github.com/users/moee/followers","following_url":"https://api.github.com/users/moee/following{/other_user}","gists_url":"https://api.github.com/users/moee/gists{/gist_id}","starred_url":"https://api.github.com/users/moee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moee/subscriptions","organizations_url":"https://api.github.com/users/moee/orgs","repos_url":"https://api.github.com/users/moee/repos","events_url":"https://api.github.com/users/moee/events{/privacy}","received_events_url":"https://api.github.com/users/moee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-02T07:46:17Z","updated_at":"2015-07-02T15:34:42Z","closed_at":"2015-07-02T15:34:42Z","body":"I tried to set up a Docker container that runs the swagger server. For this I followed the instructions on https://www.npmjs.com/package/swagger-server. \r\n\r\n**Environment**\r\n\r\n*index.js:*\r\n\r\n    var swagger = require('swagger-server');\r\n    var server = new swagger.Server();\r\n    server.parse('PetStore.yaml');\r\n    server.listen(8000, function() { console.log('running'); });\r\n\r\n*PetStore.yaml:*\r\n\r\nhttps://raw.githubusercontent.com/swagger-api/swagger-spec/master/examples/v2.0/yaml/petstore.yaml\r\n\r\n*Dockerfile:*\r\n\r\n    FROM node\r\n    WORKDIR /src\r\n    RUN npm install swagger-server\r\n    COPY index.js /src/index.js\r\n    COPY PetStore.yaml /src/PetStore.yaml\r\n    CMD [\"node\", \"index.js\"]\r\n\r\nPutting it all together:\r\n\r\n`docker build -t swagger-server . && docker run swagger-server`\r\n\r\n**Expected behavior**\r\n\r\nThe swagger server should be executed.\r\n\r\n**Actual behavior**\r\n\r\nThe following exception is thrown:\r\n\r\n    module.js:338\r\n        throw err;\r\n              ^\r\n    Error: Cannot find module 'swagger-schema-official/schema'\r\n        at Function.Module._resolveFilename (module.js:336:15)\r\n        at Function.Module._load (module.js:278:25)\r\n        at Module.require (module.js:365:17)\r\n        at require (module.js:384:17)\r\n        at /src/node_modules/swagger-server/node_modules/swagger-parser/index.js:12:23\r\n        at Object.<anonymous> (/src/node_modules/swagger-server/node_modules/swagger-parser/index.js:542:3)\r\n        at Module._compile (module.js:460:26)\r\n        at Object.Module._extensions..js (module.js:478:10)\r\n        at Module.load (module.js:355:32)\r\n        at Function.Module._load (module.js:310:12)\r\n\r\n**Additional information**\r\n\r\nI also tried to install the node package `swagger-schema-official` in versions 1.2.0 and 2.0, but to no avail."},"comment":{"url":"https://api.github.com/repos/BigstickCarpet/swagger-server/issues/comments/118070775","html_url":"https://github.com/BigstickCarpet/swagger-server/issues/8#issuecomment-118070775","issue_url":"https://api.github.com/repos/BigstickCarpet/swagger-server/issues/8","id":118070775,"user":{"login":"BigstickCarpet","id":3453903,"avatar_url":"https://avatars.githubusercontent.com/u/3453903?v=3","gravatar_id":"","url":"https://api.github.com/users/BigstickCarpet","html_url":"https://github.com/BigstickCarpet","followers_url":"https://api.github.com/users/BigstickCarpet/followers","following_url":"https://api.github.com/users/BigstickCarpet/following{/other_user}","gists_url":"https://api.github.com/users/BigstickCarpet/gists{/gist_id}","starred_url":"https://api.github.com/users/BigstickCarpet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigstickCarpet/subscriptions","organizations_url":"https://api.github.com/users/BigstickCarpet/orgs","repos_url":"https://api.github.com/users/BigstickCarpet/repos","events_url":"https://api.github.com/users/BigstickCarpet/events{/privacy}","received_events_url":"https://api.github.com/users/BigstickCarpet/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T15:34:42Z","updated_at":"2015-07-02T15:34:42Z","body":"Thanks for pointing this out.  It's fixed now.\r\n\r\nThe installation instructions said to either use `npm install swagger-server` or `npm install swagger-server@0.0.x`. The latter one **always** worked, since you're explicitly specifying the `0.0.x` tag.  The former one **sometimes** worked, depending on the version of NPM you have instead.  Since no tag is specified, some versions of NPM choose to install the `latest` version (which is the `1.0.0-alpha`), but other versions of NPM choose to install the latest _released_ version (which is `0.0.x`).\r\n\r\nSo, I've updated the instructions to always explicitly specify the tag.  Either use `npm install swagger-server@latest` or `npm install swagger-server@0.0.x`."}}