Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems an build #329

Closed
stundzig opened this issue Oct 10, 2013 · 6 comments
Closed

problems an build #329

stundzig opened this issue Oct 10, 2013 · 6 comments

Comments

@stundzig
Copy link

Hi folks,

actually I'm trying to get swagger-springmvc or swagger4spring-web running with the current swagger-ui. But for some reasons, the JSON coming from them seems to be incompatibel with the swagger-ui. For example the http errorresponse message is named reason in the JSON, but message in the ui.

So I would like to build swagger-ui. I've installed npm, handlebars.js and java too. I've done npm install, without any errors. But on npm run-script build I got:

mb-sst:swagger-ui stundzig$ npm run-script build

> [email protected] build /Users/stundzig/Desktop/desk/projects/exa/git/swagger-ui
> PATH=$PATH:./node_modules/.bin cake dist


module.js:340
    throw err;
          ^
Error: Cannot find module 'less'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/stundzig/Desktop/desk/projects/exa/git/swagger-ui/Cakefile:10:10)
    at Object.<anonymous> (/Users/stundzig/Desktop/desk/projects/exa/git/swagger-ui/Cakefile:185:4)
    at Module._compile (module.js:456:26)
    at Object.exports.run (/Users/stundzig/Desktop/desk/projects/exa/git/swagger-ui/node_modules/coffee-script/lib/coffee-script/coffee-script.js:82:25)
    at Object.exports.run (/Users/stundzig/Desktop/desk/projects/exa/git/swagger-ui/node_modules/coffee-script/lib/coffee-script/cake.js:53:18)
    at Object.<anonymous> (/Users/stundzig/Desktop/desk/projects/exa/git/swagger-ui/node_modules/coffee-script/bin/cake:7:38)
npm ERR! weird error 8
npm ERR! not ok code 0

Whats wrong here? I'm developing on Mac OS.

Thanks for any answer.

Regards
Steffen...

@fehguy
Copy link
Contributor

fehguy commented Oct 10, 2013

Hi, run npm install to pick up lessc and you should be good.

@stundzig
Copy link
Author

Hi,

thanks for your answer. I've run npm install before, without any problems. But the problems still exists. Do I need some more dependent files?

@fehguy
Copy link
Contributor

fehguy commented Oct 10, 2013

the lessc dependency was just added over the weekend. After npm install, you should see this:

$ ls -1 node_modules/
coffee-script
handlebars
less

@stundzig
Copy link
Author

Hi,

i've cloned this repo this morning.

mb-sst:swagger-ui stundzig$ git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   handlebars.js
nothing added to commit but untracked files present (use "git add" to track)
mb-sst:swagger-ui stundzig$ npm install
mb-sst:swagger-ui stundzig$ ls -l node_modules/
total 0
drwxr-xr-x  12 stundzig  staff  408 10 Okt 10:25 coffee-script
drwxr-xr-x  20 stundzig  staff  680 10 Okt 10:26 handlebars
mb-sst:swagger-ui stundzig$ 

But I couldn't find the less.

@fehguy
Copy link
Contributor

fehguy commented Oct 10, 2013

Right you are. Please pull again, it should be resolved.

@stundzig
Copy link
Author

It works now, great, thank you very much.

mb-sst:swagger-ui stundzig$ npm run-script build

> [email protected] build /Users/stundzig/Desktop/desk/projects/exa/git/swagger-ui
> PATH=$PATH:./node_modules/.bin cake dist

Build distribution in ./dist
path.existsSync is now called `fs.existsSync`.
   : Reading src/main/coffeescript/SwaggerUi.coffee
   : Reading src/main/coffeescript/view/HeaderView.coffee
   : Reading src/main/coffeescript/view/MainView.coffee
   : Reading src/main/coffeescript/view/ResourceView.coffee
   : Reading src/main/coffeescript/view/OperationView.coffee
   : Reading src/main/coffeescript/view/StatusCodeView.coffee
   : Reading src/main/coffeescript/view/ParameterView.coffee
   : Reading src/main/coffeescript/view/SignatureView.coffee
   : Reading src/main/coffeescript/view/ContentTypeView.coffee
   : Reading src/main/coffeescript/view/ResponseContentTypeView.coffee
   : Reading src/main/coffeescript/view/ParameterContentTypeView.coffee
   : Precompiling templates...
   : Compiling src/main/template/content_type.handlebars
   : Compiling src/main/template/main.handlebars
   : Compiling src/main/template/operation.handlebars
   : Compiling src/main/template/param.handlebars
   : Compiling src/main/template/param_list.handlebars
   : Compiling src/main/template/param_readonly.handlebars
   : Compiling src/main/template/param_readonly_required.handlebars
   : Compiling src/main/template/param_required.handlebars
   : Compiling src/main/template/parameter_content_type.handlebars
   : Compiling src/main/template/resource.handlebars
   : Compiling src/main/template/response_content_type.handlebars
   : Compiling src/main/template/signature.handlebars
   : Compiling src/main/template/status_code.handlebars
   : Collecting Coffeescript source...
   : Compiling...
   : Combining with javascript...
   : Minifying all...
   : Compiling LESS...
   : Packaging...
   : Copied swagger-ui libs
   : Copied swagger dependencies
   : Copied html dependencies
   !
null
mb-sst:swagger-ui stundzig$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants