APIDevTools / swagger-cli

Swagger 2.0 and OpenAPI 3.0 command-line tool
https://apitools.dev/swagger-cli
MIT License
515 stars 69 forks source link

Can't not bundle in Travis CI #41

Closed magiskboy closed 4 years ago

magiskboy commented 4 years ago

I try to bundle doc in travis but it's not success, Seems, it was a js error Note, build folder existed

This is error

$ swagger-cli bundle -o build/swagger.bundle.yaml -t yaml swagger.yaml
Cannot read property 'mkdir' of undefined

This is .travis.yml

language: node_js

node_js:
  - 8

before_install:
  - npm install swagger-cli
  - export PATH=$(npm bin):$PATH

script:
  - swagger-cli validate swagger.yaml

after_success:
  - swagger-cli bundle -o build/swagger.bundle.yaml -t yaml swagger.yaml

deploy:
  provider: pages
  skip_cleanup: true
  github_token: $GH_TOKEN
  local_dir: build
  on:
    branch: master
JamesMessinger commented 4 years ago

Node 8 is no longer supported. Change the node_js setting in your Travis CI file to 10 and it'll work