cloudfoundry / nodejs-buildpack

Cloud Foundry buildpack for Node.js
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
171 stars 385 forks source link

Middleware compression doesn't work when push to cloud foundry #190

Closed DarknessZX closed 5 years ago

DarknessZX commented 5 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? cf curl /v2/info "name": "IBM Cloud", "build": "6.8.0", "support": "http://ibm.biz/bluemix-supportinfo", "version": 0, "description": "IBM Bluemix",

cf version cf.exe version 6.40.1+85d04488a.2018-10-31

What version of the buildpack you are using?

If you were attempting to accomplish a task, what was it you were attempting to do? I want to serve my static file (js, css, html) with gzip compression using compression middleware for express.

What did you expect to happen? My static file js, css, html got response with gzip and compressed file size

What was the actual behavior? The app run fine in local but when I push to cloud foundry. The js, css, html file aren't compressed. The response in header not have gzip and the file size are still uncompressed. For example the css is 5KB when response with gzip but in cloud foundry the file size is 22KB.

Can you provide a sample app? Just create a simple app with css, js in static folder. let app = express(); app.use(compression()); app.use(express.static(publicPath));

Please confirm where necessary:

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/165901606

The labels on this github issue will be updated when the story is started.

graphen007 commented 5 years ago

I'm facing this issue as well.

sclevine commented 5 years ago

Could you provide the full output of cf push for these apps?

DarknessZX commented 5 years ago
Stopping app...

Staging app and tracing logs...
   Downloading liberty-for-java_v3_31-20190423-1354...
   Downloading php_buildpack...
   Downloading binary_buildpack...
   Downloading staticfile_buildpack...
   Downloading xpages_buildpack...
   Downloaded xpages_buildpack
   Downloaded liberty-for-java_v3_31-20190423-1354
   Downloading liberty-for-java...
   Downloading sdk-for-nodejs...
   Downloaded staticfile_buildpack
   Downloading dotnet-core...
   Downloaded binary_buildpack
   Downloading swift_buildpack...
   Downloaded php_buildpack
   Downloading java_buildpack...
   Downloaded liberty-for-java
   Downloading ruby_buildpack...
   Downloaded sdk-for-nodejs
   Downloading nodejs_buildpack...
   Downloaded swift_buildpack
   Downloading go_buildpack...
   Downloaded dotnet-core
   Downloading python_buildpack...
   Downloaded java_buildpack
   Downloading swift_buildpack_v2_0_18-20190303-1915...
   Downloaded ruby_buildpack
   Downloading dotnet-core_v1_0_26-20170913-1346...
   Downloaded python_buildpack
   Downloading sdk-for-nodejs_v3_25_1-20190115-1637...
   Downloaded nodejs_buildpack
   Downloading sdk-for-nodejs_v3_26-20190313-1440...
   Downloaded go_buildpack
   Downloading dotnet-core_v2_1-20181205-1536...
   Downloaded swift_buildpack_v2_0_18-20190303-1915
   Downloading dotnet-core_v2_2-20190327-1013...
   Downloaded sdk-for-nodejs_v3_25_1-20190115-1637
   Downloading swift_buildpack_v2_0_20-20190401-2122...
   Downloaded dotnet-core_v1_0_26-20170913-1346
   Downloading liberty-for-java_v3_30-20190325-1301...
   Downloaded dotnet-core_v2_1-20181205-1536
   Downloaded sdk-for-nodejs_v3_26-20190313-1440
   Downloaded dotnet-core_v2_2-20190327-1013
   Downloaded swift_buildpack_v2_0_20-20190401-2122
   Downloaded liberty-for-java_v3_30-20190325-1301
   Cell 630cd827-2dc2-4efa-8c22-ad66afb7fe84 creating container for instance f0bc0410-8734-4460-b44e-bf89f9ea9b20
   Cell 630cd827-2dc2-4efa-8c22-ad66afb7fe84 successfully created container for instance f0bc0410-8734-4460-b44e-bf89f9ea9b20
   Downloading build artifacts cache...
   Downloading app package...
   Downloaded app package (30.1M)
   Downloaded build artifacts cache (6.3M)
   -----> IBM SDK for Node.js Buildpack v3.26-20190313-1440
          Based on Cloud Foundry Node.js Buildpack v1.5.24
   -----> Creating runtime environment

          NPM_CONFIG_LOGLEVEL=error
          NPM_CONFIG_PRODUCTION=true
          NODE_ENV=production
          NODE_MODULES_CACHE=true
   -----> Installing binaries
          engines.node (package.json):  unspecified
          engines.npm (package.json):   unspecified (use default)

          Resolving node version (latest stable) via 'node-version-resolver'
          Downloading and installing node 6.17.0...
          Using default npm version: 3.10.10
   -----> Restoring cache
          Skipping cache restore (new runtime signature)
   -----> Checking and configuring service extensions before installing dependencies
   -----> Building dependencies
          Prebuild detected (node_modules already exists)
          Rebuilding any native modules

          > websocket@1.0.28 install /tmp/app/node_modules/websocket
          > (node-gyp rebuild 2> builderror.log) || (exit 0)

          make: Entering directory `/tmp/app/node_modules/websocket/build'
          CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
          SOLINK_MODULE(target) Release/obj.target/bufferutil.node
          COPY Release/bufferutil.node
          CXX(target) Release/obj.target/validation/src/validation.o
          SOLINK_MODULE(target) Release/obj.target/validation.node
          COPY Release/validation.node
          make: Leaving directory `/tmp/app/node_modules/websocket/build'
          @google/chatbase@1.1.2 /tmp/app/node_modules/@google/chatbase
          aws4@1.7.0 /tmp/app/node_modules/aws4
          caseless@0.12.0 /tmp/app/node_modules/caseless
          combined-stream@1.0.5 /tmp/app/node_modules/combined-stream
          delayed-stream@1.0.0 /tmp/app/node_modules/delayed-stream
          extend@3.0.1 /tmp/app/node_modules/extend
          forever-agent@0.6.1 /tmp/app/node_modules/forever-agent
          form-data@2.3.1 /tmp/app/node_modules/form-data
          asynckit@0.4.0 /tmp/app/node_modules/asynckit
          mime-types@2.1.17 /tmp/app/node_modules/mime-types
          mime-db@1.30.0 /tmp/app/node_modules/mime-db
          har-validator@5.0.3 /tmp/app/node_modules/har-validator
          ajv@5.2.3 /tmp/app/node_modules/har-validator/node_modules/ajv
          co@4.6.0 /tmp/app/node_modules/har-validator/node_modules/ajv/node_modules/co
          fast-deep-equal@1.0.0 /tmp/app/node_modules/fast-deep-equal
          json-schema-traverse@0.3.1 /tmp/app/node_modules/json-schema-traverse
          debug@2.6.9 /tmp/app/node_modules/debug
          ms@2.0.0 /tmp/app/node_modules/ms
          got@6.7.1 /tmp/app/node_modules/got
          create-error-class@3.0.2 /tmp/app/node_modules/create-error-class
          capture-stack-trace@1.0.1 /tmp/app/node_modules/capture-stack-trace
          duplexer3@0.1.4 /tmp/app/node_modules/duplexer3
          get-stream@3.0.0 /tmp/app/node_modules/get-stream
          is-redirect@1.0.0 /tmp/app/node_modules/is-redirect
          is-retry-allowed@1.1.0 /tmp/app/node_modules/is-retry-allowed
          is-stream@1.1.0 /tmp/app/node_modules/is-stream
          lowercase-keys@1.0.1 /tmp/app/node_modules/lowercase-keys
          safe-buffer@5.1.1 /tmp/app/node_modules/safe-buffer
          timed-out@4.0.1 /tmp/app/node_modules/timed-out
          unzip-response@2.0.1 /tmp/app/node_modules/unzip-response
          url-parse-lax@1.0.0 /tmp/app/node_modules/url-parse-lax
          prepend-http@1.0.4 /tmp/app/node_modules/prepend-http
          lodash.every@4.6.0 /tmp/app/node_modules/lodash.every
          lodash.has@4.5.2 /tmp/app/node_modules/lodash.has
          lodash.isboolean@3.0.3 /tmp/app/node_modules/lodash.isboolean
          lodash.isempty@4.4.0 /tmp/app/node_modules/lodash.isempty
          lodash.isnull@3.0.0 /tmp/app/node_modules/lodash.isnull
          lodash.isnumber@3.0.3 /tmp/app/node_modules/lodash.isnumber
          lodash.isstring@4.0.1 /tmp/app/node_modules/lodash.isstring
          lodash.last@3.0.0 /tmp/app/node_modules/lodash.last
          lodash.merge@4.6.1 /tmp/app/node_modules/lodash.merge
          lodash.omit@4.5.0 /tmp/app/node_modules/lodash.omit
          lodash.omitby@4.6.0 /tmp/app/node_modules/lodash.omitby
          lodash.pick@4.4.0 /tmp/app/node_modules/lodash.pick
          lodash.pickby@4.6.0 /tmp/app/node_modules/lodash.pickby
          lodash.transform@4.6.0 /tmp/app/node_modules/lodash.transform
          body-parser@1.18.2 /tmp/app/node_modules/body-parser
          bytes@3.0.0 /tmp/app/node_modules/bytes
          content-type@1.0.4 /tmp/app/node_modules/content-type
          debug@2.6.9 /tmp/app/node_modules/body-parser/node_modules/debug
          ms@2.0.0 /tmp/app/node_modules/body-parser/node_modules/ms
          depd@1.1.1 /tmp/app/node_modules/depd
          http-errors@1.6.2 /tmp/app/node_modules/http-errors
          inherits@2.0.3 /tmp/app/node_modules/http-errors/node_modules/inherits
          setprototypeof@1.0.3 /tmp/app/node_modules/setprototypeof
          statuses@1.3.1 /tmp/app/node_modules/statuses
          iconv-lite@0.4.19 /tmp/app/node_modules/iconv-lite
          on-finished@2.3.0 /tmp/app/node_modules/on-finished
          ee-first@1.1.1 /tmp/app/node_modules/ee-first
          qs@6.5.1 /tmp/app/node_modules/qs
          raw-body@2.3.2 /tmp/app/node_modules/raw-body
          unpipe@1.0.0 /tmp/app/node_modules/unpipe
          type-is@1.6.15 /tmp/app/node_modules/type-is
          media-typer@0.3.0 /tmp/app/node_modules/media-typer
          mime-types@2.1.17 /tmp/app/node_modules/type-is/node_modules/mime-types
          mime-db@1.30.0 /tmp/app/node_modules/type-is/node_modules/mime-db
          botbuilder@3.15.0 /tmp/app/node_modules/botbuilder
          @types/async@2.0.49 /tmp/app/node_modules/@types/async
          @types/express@4.11.1 /tmp/app/node_modules/@types/express
          @types/body-parser@1.17.0 /tmp/app/node_modules/@types/body-parser
          @types/connect@3.4.32 /tmp/app/node_modules/@types/connect
          @types/node@9.6.18 /tmp/app/node_modules/@types/node
          @types/express-serve-static-core@4.11.1 /tmp/app/node_modules/@types/express-serve-static-core
          @types/events@1.2.0 /tmp/app/node_modules/@types/events
          @types/serve-static@1.13.2 /tmp/app/node_modules/@types/serve-static
          @types/mime@2.0.0 /tmp/app/node_modules/@types/mime
          @types/form-data@2.2.1 /tmp/app/node_modules/@types/form-data
          @types/jsonwebtoken@7.2.7 /tmp/app/node_modules/@types/jsonwebtoken
          @types/request@2.47.0 /tmp/app/node_modules/@types/request
          @types/caseless@0.12.1 /tmp/app/node_modules/@types/caseless
          @types/tough-cookie@2.3.3 /tmp/app/node_modules/@types/tough-cookie
          @types/sprintf-js@1.1.0 /tmp/app/node_modules/@types/sprintf-js
          @types/url-join@0.8.2 /tmp/app/node_modules/@types/url-join
          async@1.5.2 /tmp/app/node_modules/botbuilder/node_modules/async
          base64url@2.0.0 /tmp/app/node_modules/base64url
          chrono-node@1.3.5 /tmp/app/node_modules/chrono-node
          moment@2.22.2 /tmp/app/node_modules/moment
          jsonwebtoken@7.4.3 /tmp/app/node_modules/jsonwebtoken
          joi@6.10.1 /tmp/app/node_modules/joi
          hoek@2.16.3 /tmp/app/node_modules/hoek
          isemail@1.2.0 /tmp/app/node_modules/isemail
          topo@1.1.0 /tmp/app/node_modules/topo
          jws@3.1.5 /tmp/app/node_modules/jws
          jwa@1.1.6 /tmp/app/node_modules/jwa
          buffer-equal-constant-time@1.0.1 /tmp/app/node_modules/buffer-equal-constant-time
          ecdsa-sig-formatter@1.0.10 /tmp/app/node_modules/ecdsa-sig-formatter
          lodash.once@4.1.1 /tmp/app/node_modules/lodash.once
          xtend@4.0.1 /tmp/app/node_modules/xtend
          promise@7.3.1 /tmp/app/node_modules/promise
          asap@2.0.6 /tmp/app/node_modules/asap
          request@2.87.0 /tmp/app/node_modules/request
          aws-sign2@0.7.0 /tmp/app/node_modules/aws-sign2
          json-stable-stringify@1.0.1 /tmp/app/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify
          jsonify@0.0.0 /tmp/app/node_modules/jsonify
          har-schema@2.0.0 /tmp/app/node_modules/har-schema
          http-signature@1.2.0 /tmp/app/node_modules/http-signature
          assert-plus@1.0.0 /tmp/app/node_modules/assert-plus
          jsprim@1.4.1 /tmp/app/node_modules/jsprim
          extsprintf@1.3.0 /tmp/app/node_modules/extsprintf
          json-schema@0.2.3 /tmp/app/node_modules/json-schema
          verror@1.10.0 /tmp/app/node_modules/verror
          core-util-is@1.0.2 /tmp/app/node_modules/core-util-is
          sshpk@1.13.1 /tmp/app/node_modules/sshpk
          asn1@0.2.3 /tmp/app/node_modules/asn1
          dashdash@1.14.1 /tmp/app/node_modules/dashdash
          getpass@0.1.7 /tmp/app/node_modules/getpass
          is-typedarray@1.0.0 /tmp/app/node_modules/is-typedarray
          isstream@0.1.2 /tmp/app/node_modules/isstream
          json-stringify-safe@5.0.1 /tmp/app/node_modules/json-stringify-safe
          oauth-sign@0.8.2 /tmp/app/node_modules/oauth-sign
          performance-now@2.1.0 /tmp/app/node_modules/performance-now
          tough-cookie@2.3.4 /tmp/app/node_modules/tough-cookie
          punycode@1.4.1 /tmp/app/node_modules/punycode
          tunnel-agent@0.6.0 /tmp/app/node_modules/tunnel-agent
          uuid@3.2.1 /tmp/app/node_modules/uuid
          rsa-pem-from-mod-exp@0.8.4 /tmp/app/node_modules/rsa-pem-from-mod-exp
          sprintf-js@1.1.1 /tmp/app/node_modules/sprintf-js
          url-join@1.1.0 /tmp/app/node_modules/url-join
          cloudant@1.10.0-NOTICE /tmp/app/node_modules/cloudant
          async@2.1.2 /tmp/app/node_modules/cloudant/node_modules/async
          lodash@4.17.5 /tmp/app/node_modules/lodash
          cloudant-nano@6.7.0 /tmp/app/node_modules/cloudant-nano
          cloudant-follow@0.17.0 /tmp/app/node_modules/cloudant-follow
          browser-request@0.3.3 /tmp/app/node_modules/browser-request
          debug@3.1.0 /tmp/app/node_modules/cloudant-follow/node_modules/debug
          debug@3.1.0 /tmp/app/node_modules/cloudant-nano/node_modules/debug
          errs@0.3.2 /tmp/app/node_modules/errs
          underscore@1.9.0 /tmp/app/node_modules/underscore
          debug@3.1.0 /tmp/app/node_modules/cloudant/node_modules/debug
          compression@1.7.4 /tmp/app/node_modules/compression
          accepts@1.3.7 /tmp/app/node_modules/compression/node_modules/accepts
          mime-types@2.1.24 /tmp/app/node_modules/compression/node_modules/mime-types
          mime-db@1.40.0 /tmp/app/node_modules/compression/node_modules/mime-db
          negotiator@0.6.2 /tmp/app/node_modules/compression/node_modules/negotiator
          compressible@2.0.17 /tmp/app/node_modules/compressible
          mime-db@1.40.0 /tmp/app/node_modules/compressible/node_modules/mime-db
          on-headers@1.0.2 /tmp/app/node_modules/on-headers
          safe-buffer@5.1.2 /tmp/app/node_modules/compression/node_modules/safe-buffer
          vary@1.1.2 /tmp/app/node_modules/vary
          cors@2.8.4 /tmp/app/node_modules/cors
          object-assign@4.1.1 /tmp/app/node_modules/object-assign
          dotenv@2.0.0 /tmp/app/node_modules/dotenv
          express@4.16.1 /tmp/app/node_modules/express
          accepts@1.3.4 /tmp/app/node_modules/accepts
          mime-types@2.1.17 /tmp/app/node_modules/accepts/node_modules/mime-types
          mime-db@1.30.0 /tmp/app/node_modules/accepts/node_modules/mime-db
          negotiator@0.6.1 /tmp/app/node_modules/negotiator
          array-flatten@1.1.1 /tmp/app/node_modules/array-flatten
          content-disposition@0.5.2 /tmp/app/node_modules/content-disposition
          cookie@0.3.1 /tmp/app/node_modules/cookie
          cookie-signature@1.0.6 /tmp/app/node_modules/cookie-signature
          debug@2.6.9 /tmp/app/node_modules/express/node_modules/debug
          ms@2.0.0 /tmp/app/node_modules/express/node_modules/ms
          encodeurl@1.0.1 /tmp/app/node_modules/encodeurl
          escape-html@1.0.3 /tmp/app/node_modules/escape-html
          etag@1.8.1 /tmp/app/node_modules/etag
          finalhandler@1.1.0 /tmp/app/node_modules/finalhandler
          debug@2.6.9 /tmp/app/node_modules/finalhandler/node_modules/debug
          ms@2.0.0 /tmp/app/node_modules/finalhandler/node_modules/ms
          parseurl@1.3.2 /tmp/app/node_modules/parseurl
          fresh@0.5.2 /tmp/app/node_modules/fresh
          merge-descriptors@1.0.1 /tmp/app/node_modules/merge-descriptors
          methods@1.1.2 /tmp/app/node_modules/methods
          path-to-regexp@0.1.7 /tmp/app/node_modules/path-to-regexp
          proxy-addr@2.0.2 /tmp/app/node_modules/proxy-addr
          forwarded@0.1.2 /tmp/app/node_modules/forwarded
          ipaddr.js@1.5.2 /tmp/app/node_modules/ipaddr.js
          range-parser@1.2.0 /tmp/app/node_modules/range-parser
          send@0.16.1 /tmp/app/node_modules/send
          debug@2.6.9 /tmp/app/node_modules/send/node_modules/debug
          ms@2.0.0 /tmp/app/node_modules/send/node_modules/ms
          destroy@1.0.4 /tmp/app/node_modules/destroy
          mime@1.4.1 /tmp/app/node_modules/send/node_modules/mime
          serve-static@1.13.1 /tmp/app/node_modules/serve-static
          setprototypeof@1.1.0 /tmp/app/node_modules/express/node_modules/setprototypeof
          utils-merge@1.0.1 /tmp/app/node_modules/utils-merge
          gulp-rename@1.4.0 /tmp/app/node_modules/gulp-rename
          nano@6.4.4 /tmp/app/node_modules/nano
          slick-carousel@1.8.1 /tmp/app/node_modules/slick-carousel
          universal-analytics@0.4.17 /tmp/app/node_modules/universal-analytics
          debug@3.1.0 /tmp/app/node_modules/universal-analytics/node_modules/debug
          request@2.86.0 /tmp/app/node_modules/universal-analytics/node_modules/request
          hawk@6.0.2 /tmp/app/node_modules/hawk
          boom@4.3.1 /tmp/app/node_modules/hawk/node_modules/boom
          hoek@4.2.0 /tmp/app/node_modules/hawk/node_modules/hoek
          cryptiles@3.1.2 /tmp/app/node_modules/hawk/node_modules/cryptiles
          boom@5.2.0 /tmp/app/node_modules/hawk/node_modules/cryptiles/node_modules/boom
          sntp@2.0.2 /tmp/app/node_modules/hawk/node_modules/sntp
          watson-developer-cloud@3.13.0 /tmp/app/node_modules/watson-developer-cloud
          @types/csv-stringify@1.4.2 /tmp/app/node_modules/@types/csv-stringify
          @types/extend@3.0.0 /tmp/app/node_modules/@types/extend
          @types/file-type@5.2.1 /tmp/app/node_modules/@types/file-type
          @types/is-stream@1.1.0 /tmp/app/node_modules/@types/is-stream
          @types/node@10.3.6 /tmp/app/node_modules/watson-developer-cloud/node_modules/@types/node
          @types/request@2.47.1 /tmp/app/node_modules/watson-developer-cloud/node_modules/@types/request
          async@2.6.1 /tmp/app/node_modules/async
          lodash@4.17.11 /tmp/app/node_modules/async/node_modules/lodash
          buffer-from@1.1.1 /tmp/app/node_modules/buffer-from
          csv-stringify@1.0.4 /tmp/app/node_modules/csv-stringify
          lodash.get@4.4.2 /tmp/app/node_modules/lodash.get
          file-type@7.7.1 /tmp/app/node_modules/file-type
          mime-types@2.1.21 /tmp/app/node_modules/watson-developer-cloud/node_modules/mime-types
          mime-db@1.37.0 /tmp/app/node_modules/watson-developer-cloud/node_modules/mime-db
          object.omit@3.0.0 /tmp/app/node_modules/object.omit
          is-extendable@1.0.1 /tmp/app/node_modules/is-extendable
          is-plain-object@2.0.4 /tmp/app/node_modules/is-plain-object
          isobject@3.0.1 /tmp/app/node_modules/isobject
          object.pick@1.3.0 /tmp/app/node_modules/object.pick
          vcap_services@0.3.4 /tmp/app/node_modules/vcap_services
          websocket@1.0.28 /tmp/app/node_modules/websocket
          nan@2.11.1 /tmp/app/node_modules/nan
          typedarray-to-buffer@3.1.5 /tmp/app/node_modules/typedarray-to-buffer
          yaeti@0.0.6 /tmp/app/node_modules/yaeti
          xml-js@1.6.3 /tmp/app/node_modules/xml-js
          sax@1.2.4 /tmp/app/node_modules/sax
          copy-descriptor@0.1.1 /tmp/app/node_modules/copy-descriptor
          get-value@2.0.6 /tmp/app/node_modules/get-value
          ansi-colors@1.1.0 /tmp/app/node_modules/ansi-colors
          ansi-wrap@0.1.0 /tmp/app/node_modules/ansi-wrap
          ansi-gray@0.1.1 /tmp/app/node_modules/ansi-gray
          ansi-regex@2.1.1 /tmp/app/node_modules/ansi-regex
          ansi-styles@2.2.1 /tmp/app/node_modules/ansi-styles
          archy@1.0.0 /tmp/app/node_modules/archy
          arr-diff@4.0.0 /tmp/app/node_modules/arr-diff
          arr-flatten@1.1.0 /tmp/app/node_modules/arr-flatten
          array-differ@1.0.0 /tmp/app/node_modules/array-differ
          array-each@1.0.1 /tmp/app/node_modules/array-each
          array-uniq@1.0.3 /tmp/app/node_modules/array-uniq
          array-unique@0.3.2 /tmp/app/node_modules/array-unique
          assign-symbols@1.0.0 /tmp/app/node_modules/assign-symbols
          arr-union@3.1.0 /tmp/app/node_modules/arr-union
          balanced-match@1.0.0 /tmp/app/node_modules/balanced-match
          bcrypt-pbkdf@1.0.1 /tmp/app/node_modules/bcrypt-pbkdf
          tweetnacl@0.14.5 /tmp/app/node_modules/tweetnacl
          beeper@1.1.1 /tmp/app/node_modules/beeper
          cache-base@1.0.1 /tmp/app/node_modules/cache-base
          collection-visit@1.0.0 /tmp/app/node_modules/collection-visit
          map-visit@1.0.0 /tmp/app/node_modules/map-visit
          object-visit@1.0.1 /tmp/app/node_modules/object-visit
          component-emitter@1.3.0 /tmp/app/node_modules/component-emitter
          has-value@1.0.0 /tmp/app/node_modules/has-value
          has-values@1.0.0 /tmp/app/node_modules/has-values
          is-number@3.0.0 /tmp/app/node_modules/is-number
          kind-of@3.2.2 /tmp/app/node_modules/is-number/node_modules/kind-of
          is-buffer@1.1.6 /tmp/app/node_modules/is-buffer
          kind-of@4.0.0 /tmp/app/node_modules/has-values/node_modules/kind-of
          set-value@2.0.0 /tmp/app/node_modules/set-value
          extend-shallow@2.0.1 /tmp/app/node_modules/set-value/node_modules/extend-shallow
          is-extendable@0.1.1 /tmp/app/node_modules/set-value/node_modules/is-extendable
          split-string@3.1.0 /tmp/app/node_modules/split-string
          extend-shallow@3.0.2 /tmp/app/node_modules/extend-shallow
          to-object-path@0.3.0 /tmp/app/node_modules/to-object-path
          kind-of@3.2.2 /tmp/app/node_modules/to-object-path/node_modules/kind-of
          union-value@1.0.0 /tmp/app/node_modules/union-value
          is-extendable@0.1.1 /tmp/app/node_modules/union-value/node_modules/is-extendable
          set-value@0.4.3 /tmp/app/node_modules/union-value/node_modules/set-value
          extend-shallow@2.0.1 /tmp/app/node_modules/union-value/node_modules/extend-shallow
          unset-value@1.0.0 /tmp/app/node_modules/unset-value
          has-value@0.3.1 /tmp/app/node_modules/unset-value/node_modules/has-value
          has-values@0.1.4 /tmp/app/node_modules/unset-value/node_modules/has-values
          isobject@2.1.0 /tmp/app/node_modules/unset-value/node_modules/has-value/node_modules/isobject
          isarray@1.0.0 /tmp/app/node_modules/unset-value/node_modules/isarray
          chalk@1.1.3 /tmp/app/node_modules/chalk
          escape-string-regexp@1.0.5 /tmp/app/node_modules/escape-string-regexp
          has-ansi@2.0.0 /tmp/app/node_modules/has-ansi
          strip-ansi@3.0.1 /tmp/app/node_modules/strip-ansi
          supports-color@2.0.0 /tmp/app/node_modules/supports-color
          clone@1.0.4 /tmp/app/node_modules/clone
          brace-expansion@1.1.11 /tmp/app/node_modules/brace-expansion
          concat-map@0.0.1 /tmp/app/node_modules/concat-map
          clone-buffer@1.0.0 /tmp/app/node_modules/clone-buffer
          clone-stats@0.0.1 /tmp/app/node_modules/clone-stats
          commander@2.20.0 /tmp/app/node_modules/commander
          decode-uri-component@0.2.0 /tmp/app/node_modules/decode-uri-component
          defaults@1.0.3 /tmp/app/node_modules/defaults
          dateformat@2.2.0 /tmp/app/node_modules/dateformat
          deprecated@0.0.1 /tmp/app/node_modules/deprecated
          detect-file@1.0.0 /tmp/app/node_modules/detect-file
          duplexer2@0.0.2 /tmp/app/node_modules/duplexer2
          readable-stream@1.1.14 /tmp/app/node_modules/readable-stream
          inherits@2.0.3 /tmp/app/node_modules/inherits
          isarray@0.0.1 /tmp/app/node_modules/isarray
          string_decoder@0.10.31 /tmp/app/node_modules/string_decoder
          ecc-jsbn@0.1.1 /tmp/app/node_modules/ecc-jsbn
          jsbn@0.1.1 /tmp/app/node_modules/jsbn
          end-of-stream@0.1.5 /tmp/app/node_modules/end-of-stream
          once@1.3.3 /tmp/app/node_modules/once
          wrappy@1.0.2 /tmp/app/node_modules/wrappy
          expand-tilde@2.0.2 /tmp/app/node_modules/expand-tilde
          homedir-polyfill@1.0.3 /tmp/app/node_modules/homedir-polyfill
          parse-passwd@1.0.0 /tmp/app/node_modules/parse-passwd
          fancy-log@1.3.3 /tmp/app/node_modules/fancy-log
          color-support@1.1.3 /tmp/app/node_modules/color-support
          parse-node-version@1.0.1 /tmp/app/node_modules/parse-node-version
          time-stamp@1.1.0 /tmp/app/node_modules/time-stamp
          find-index@0.1.1 /tmp/app/node_modules/find-index
          findup-sync@2.0.0 /tmp/app/node_modules/findup-sync
          is-glob@3.1.0 /tmp/app/node_modules/is-glob
          is-extglob@2.1.1 /tmp/app/node_modules/is-extglob
          micromatch@3.1.10 /tmp/app/node_modules/micromatch
          braces@2.3.2 /tmp/app/node_modules/braces
          extend-shallow@2.0.1 /tmp/app/node_modules/braces/node_modules/extend-shallow
          is-extendable@0.1.1 /tmp/app/node_modules/braces/node_modules/is-extendable
          fill-range@4.0.0 /tmp/app/node_modules/fill-range
          extend-shallow@2.0.1 /tmp/app/node_modules/fill-range/node_modules/extend-shallow
          is-extendable@0.1.1 /tmp/app/node_modules/fill-range/node_modules/is-extendable
          repeat-string@1.6.1 /tmp/app/node_modules/repeat-string
          to-regex-range@2.1.1 /tmp/app/node_modules/to-regex-range
          repeat-element@1.1.3 /tmp/app/node_modules/repeat-element
          snapdragon@0.8.2 /tmp/app/node_modules/snapdragon
          base@0.11.2 /tmp/app/node_modules/base
          class-utils@0.3.6 /tmp/app/node_modules/class-utils
          define-property@0.2.5 /tmp/app/node_modules/class-utils/node_modules/define-property
          is-descriptor@0.1.6 /tmp/app/node_modules/is-descriptor
          is-accessor-descriptor@0.1.6 /tmp/app/node_modules/is-accessor-descriptor
          kind-of@3.2.2 /tmp/app/node_modules/is-accessor-descriptor/node_modules/kind-of
          is-data-descriptor@0.1.4 /tmp/app/node_modules/is-data-descriptor
          kind-of@3.2.2 /tmp/app/node_modules/is-data-descriptor/node_modules/kind-of
          kind-of@5.1.0 /tmp/app/node_modules/is-descriptor/node_modules/kind-of
          static-extend@0.1.2 /tmp/app/node_modules/static-extend
          define-property@0.2.5 /tmp/app/node_modules/static-extend/node_modules/define-property
          object-copy@0.1.0 /tmp/app/node_modules/object-copy
          define-property@0.2.5 /tmp/app/node_modules/object-copy/node_modules/define-property
          kind-of@3.2.2 /tmp/app/node_modules/object-copy/node_modules/kind-of
          define-property@1.0.0 /tmp/app/node_modules/base/node_modules/define-property
          is-descriptor@1.0.2 /tmp/app/node_modules/base/node_modules/is-descriptor
          is-accessor-descriptor@1.0.0 /tmp/app/node_modules/base/node_modules/is-accessor-descriptor
          kind-of@6.0.2 /tmp/app/node_modules/kind-of
          is-data-descriptor@1.0.0 /tmp/app/node_modules/base/node_modules/is-data-descriptor
          mixin-deep@1.3.1 /tmp/app/node_modules/mixin-deep
          for-in@1.0.2 /tmp/app/node_modules/for-in
          pascalcase@0.1.1 /tmp/app/node_modules/pascalcase
          define-property@0.2.5 /tmp/app/node_modules/snapdragon/node_modules/define-property
          extend-shallow@2.0.1 /tmp/app/node_modules/snapdragon/node_modules/extend-shallow
          is-extendable@0.1.1 /tmp/app/node_modules/snapdragon/node_modules/is-extendable
          map-cache@0.2.2 /tmp/app/node_modules/map-cache
          source-map@0.5.7 /tmp/app/node_modules/source-map
          source-map-resolve@0.5.2 /tmp/app/node_modules/source-map-resolve
          atob@2.1.2 /tmp/app/node_modules/atob
          resolve-url@0.2.1 /tmp/app/node_modules/resolve-url
          source-map-url@0.4.0 /tmp/app/node_modules/source-map-url
          flagged-respawn@1.0.1 /tmp/app/node_modules/flagged-respawn
          urix@0.1.0 /tmp/app/node_modules/urix
          use@3.1.1 /tmp/app/node_modules/use
          snapdragon-node@2.1.1 /tmp/app/node_modules/snapdragon-node
          define-property@1.0.0 /tmp/app/node_modules/snapdragon-node/node_modules/define-property
          is-descriptor@1.0.2 /tmp/app/node_modules/snapdragon-node/node_modules/is-descriptor
          is-accessor-descriptor@1.0.0 /tmp/app/node_modules/snapdragon-node/node_modules/is-accessor-descriptor
          is-data-descriptor@1.0.0 /tmp/app/node_modules/snapdragon-node/node_modules/is-data-descriptor
          snapdragon-util@3.0.1 /tmp/app/node_modules/snapdragon-util
          kind-of@3.2.2 /tmp/app/node_modules/snapdragon-util/node_modules/kind-of
          to-regex@3.0.2 /tmp/app/node_modules/to-regex
          define-property@2.0.2 /tmp/app/node_modules/define-property
          is-descriptor@1.0.2 /tmp/app/node_modules/define-property/node_modules/is-descriptor
          is-accessor-descriptor@1.0.0 /tmp/app/node_modules/define-property/node_modules/is-accessor-descriptor
          is-data-descriptor@1.0.0 /tmp/app/node_modules/define-property/node_modules/is-data-descriptor
          regex-not@1.0.2 /tmp/app/node_modules/regex-not
          safe-regex@1.1.0 /tmp/app/node_modules/safe-regex
          ret@0.1.15 /tmp/app/node_modules/ret
          extglob@2.0.4 /tmp/app/node_modules/extglob
          define-property@1.0.0 /tmp/app/node_modules/extglob/node_modules/define-property
          is-descriptor@1.0.2 /tmp/app/node_modules/extglob/node_modules/is-descriptor
          is-accessor-descriptor@1.0.0 /tmp/app/node_modules/extglob/node_modules/is-accessor-descriptor
          is-data-descriptor@1.0.0 /tmp/app/node_modules/extglob/node_modules/is-data-descriptor
          expand-brackets@2.1.4 /tmp/app/node_modules/expand-brackets
          define-property@0.2.5 /tmp/app/node_modules/expand-brackets/node_modules/define-property
          extend-shallow@2.0.1 /tmp/app/node_modules/expand-brackets/node_modules/extend-shallow
          is-extendable@0.1.1 /tmp/app/node_modules/expand-brackets/node_modules/is-extendable
          posix-character-classes@0.1.1 /tmp/app/node_modules/posix-character-classes
          extend-shallow@2.0.1 /tmp/app/node_modules/extglob/node_modules/extend-shallow
          is-extendable@0.1.1 /tmp/app/node_modules/extglob/node_modules/is-extendable
          fragment-cache@0.2.1 /tmp/app/node_modules/fragment-cache
          nanomatch@1.2.13 /tmp/app/node_modules/nanomatch
          is-windows@1.0.2 /tmp/app/node_modules/is-windows
          resolve-dir@1.0.1 /tmp/app/node_modules/resolve-dir
          global-modules@1.0.0 /tmp/app/node_modules/global-modules
          global-prefix@1.0.2 /tmp/app/node_modules/global-prefix
          ini@1.3.5 /tmp/app/node_modules/ini
          which@1.3.1 /tmp/app/node_modules/which
          isexe@2.0.0 /tmp/app/node_modules/isexe
          fined@1.2.0 /tmp/app/node_modules/fined
          object.defaults@1.1.0 /tmp/app/node_modules/object.defaults
          array-slice@1.1.0 /tmp/app/node_modules/array-slice
          for-own@1.0.0 /tmp/app/node_modules/for-own
          parse-filepath@1.0.2 /tmp/app/node_modules/parse-filepath
          is-absolute@1.0.0 /tmp/app/node_modules/is-absolute
          is-relative@1.0.0 /tmp/app/node_modules/is-relative
          is-unc-path@1.0.0 /tmp/app/node_modules/is-unc-path
          unc-path-regex@0.1.2 /tmp/app/node_modules/unc-path-regex
          path-root@0.1.1 /tmp/app/node_modules/path-root
          path-root-regex@0.1.2 /tmp/app/node_modules/path-root-regex
          first-chunk-stream@1.0.0 /tmp/app/node_modules/first-chunk-stream
          gaze@0.5.2 /tmp/app/node_modules/gaze
          globule@0.1.0 /tmp/app/node_modules/globule
          glob@3.1.21 /tmp/app/node_modules/globule/node_modules/glob
          graceful-fs@1.2.3 /tmp/app/node_modules/globule/node_modules/graceful-fs
          inherits@1.0.2 /tmp/app/node_modules/globule/node_modules/inherits
          minimatch@0.2.14 /tmp/app/node_modules/globule/node_modules/minimatch
          lru-cache@2.7.3 /tmp/app/node_modules/lru-cache
          sigmund@1.0.1 /tmp/app/node_modules/sigmund
          lodash@1.0.2 /tmp/app/node_modules/globule/node_modules/lodash
          glob@4.5.3 /tmp/app/node_modules/glob
          inflight@1.0.6 /tmp/app/node_modules/inflight
          minimatch@2.0.10 /tmp/app/node_modules/minimatch
          glob-watcher@0.0.6 /tmp/app/node_modules/glob-watcher
          glob2base@0.0.12 /tmp/app/node_modules/glob2base
          glogg@1.0.2 /tmp/app/node_modules/glogg
          sparkles@1.0.1 /tmp/app/node_modules/sparkles
          graceful-fs@3.0.11 /tmp/app/node_modules/graceful-fs
          natives@1.1.6 /tmp/app/node_modules/natives
          gulplog@1.0.0 /tmp/app/node_modules/gulplog
          has-gulplog@0.1.0 /tmp/app/node_modules/has-gulplog
          interpret@1.2.0 /tmp/app/node_modules/interpret
          is-utf8@0.2.1 /tmp/app/node_modules/is-utf8
          liftoff@2.5.0 /tmp/app/node_modules/liftoff
          object.map@1.0.1 /tmp/app/node_modules/object.map
          make-iterator@1.0.1 /tmp/app/node_modules/make-iterator
          rechoir@0.6.2 /tmp/app/node_modules/rechoir
          resolve@1.10.1 /tmp/app/node_modules/resolve
          path-parse@1.0.6 /tmp/app/node_modules/path-parse
          lodash._basecopy@3.0.1 /tmp/app/node_modules/lodash._basecopy
          lodash._basetostring@3.0.1 /tmp/app/node_modules/lodash._basetostring
          lodash._basevalues@3.0.0 /tmp/app/node_modules/lodash._basevalues
          lodash._getnative@3.9.1 /tmp/app/node_modules/lodash._getnative
          lodash._reevaluate@3.0.0 /tmp/app/node_modules/lodash._reevaluate
          lodash._reescape@3.0.0 /tmp/app/node_modules/lodash._reescape
          lodash._reinterpolate@3.0.0 /tmp/app/node_modules/lodash._reinterpolate
          lodash._root@3.0.1 /tmp/app/node_modules/lodash._root
          lodash.escape@3.2.0 /tmp/app/node_modules/lodash.escape
          lodash.isarray@3.0.4 /tmp/app/node_modules/lodash.isarray
          lodash.isarguments@3.1.0 /tmp/app/node_modules/lodash.isarguments
          lodash._isiterateecall@3.0.9 /tmp/app/node_modules/lodash._isiterateecall
          lodash.keys@3.1.2 /tmp/app/node_modules/lodash.keys
          lodash.template@3.6.2 /tmp/app/node_modules/lodash.template
          lodash.restparam@3.6.1 /tmp/app/node_modules/lodash.restparam
          lodash.templatesettings@3.1.1 /tmp/app/node_modules/lodash.templatesettings
          minimist@1.2.0 /tmp/app/node_modules/minimist
          multipipe@0.1.2 /tmp/app/node_modules/multipipe
          o-stream@0.2.2 /tmp/app/node_modules/o-stream
          orchestrator@0.3.8 /tmp/app/node_modules/orchestrator
          sequencify@0.0.7 /tmp/app/node_modules/sequencify
          stream-consume@0.1.1 /tmp/app/node_modules/stream-consume
          ordered-read-streams@0.1.0 /tmp/app/node_modules/ordered-read-streams
          os-homedir@1.0.2 /tmp/app/node_modules/os-homedir
          plugin-error@1.0.1 /tmp/app/node_modules/plugin-error
          pretty-hrtime@1.0.3 /tmp/app/node_modules/pretty-hrtime
          process-nextick-args@2.0.0 /tmp/app/node_modules/process-nextick-args
          remove-trailing-separator@1.1.0 /tmp/app/node_modules/remove-trailing-separator
          replace-ext@0.0.1 /tmp/app/node_modules/replace-ext
          tildify@1.2.0 /tmp/app/node_modules/tildify
          unique-stream@1.0.0 /tmp/app/node_modules/unique-stream
          util-deprecate@1.0.2 /tmp/app/node_modules/util-deprecate
          v8flags@2.1.1 /tmp/app/node_modules/v8flags
          user-home@1.1.1 /tmp/app/node_modules/user-home
          vinyl@0.5.3 /tmp/app/node_modules/vinyl
          vinyl-sourcemaps-apply@0.2.1 /tmp/app/node_modules/vinyl-sourcemaps-apply
          gulp@3.9.1 /tmp/app/node_modules/gulp
          gulp-util@3.0.8 /tmp/app/node_modules/gulp-util
          object-assign@3.0.0 /tmp/app/node_modules/gulp-util/node_modules/object-assign
          through2@2.0.5 /tmp/app/node_modules/through2
          readable-stream@2.3.6 /tmp/app/node_modules/through2/node_modules/readable-stream
          isarray@1.0.0 /tmp/app/node_modules/through2/node_modules/isarray
          string_decoder@1.1.1 /tmp/app/node_modules/through2/node_modules/string_decoder
          semver@4.3.6 /tmp/app/node_modules/semver
          vinyl-fs@0.3.14 /tmp/app/node_modules/vinyl-fs
          glob-stream@3.1.18 /tmp/app/node_modules/glob-stream
          through2@0.6.5 /tmp/app/node_modules/glob-stream/node_modules/through2
          readable-stream@1.0.34 /tmp/app/node_modules/glob-stream/node_modules/readable-stream
          mkdirp@0.5.1 /tmp/app/node_modules/mkdirp
          minimist@0.0.8 /tmp/app/node_modules/mkdirp/node_modules/minimist
          strip-bom@1.0.0 /tmp/app/node_modules/strip-bom
          through2@0.6.5 /tmp/app/node_modules/vinyl-fs/node_modules/through2
          readable-stream@1.0.34 /tmp/app/node_modules/vinyl-fs/node_modules/readable-stream
          vinyl@0.4.6 /tmp/app/node_modules/vinyl-fs/node_modules/vinyl
          clone@0.2.0 /tmp/app/node_modules/vinyl-fs/node_modules/clone
          clean-css@4.2.1 /tmp/app/node_modules/clean-css
          source-map@0.6.1 /tmp/app/node_modules/clean-css/node_modules/source-map
          cloneable-readable@1.1.2 /tmp/app/node_modules/cloneable-readable
          readable-stream@2.3.6 /tmp/app/node_modules/cloneable-readable/node_modules/readable-stream
          isarray@1.0.0 /tmp/app/node_modules/cloneable-readable/node_modules/isarray
          string_decoder@1.1.1 /tmp/app/node_modules/cloneable-readable/node_modules/string_decoder
          concat-with-sourcemaps@1.1.0 /tmp/app/node_modules/concat-with-sourcemaps
          source-map@0.6.1 /tmp/app/node_modules/concat-with-sourcemaps/node_modules/source-map
          gulp-clean-css@3.10.0 /tmp/app/node_modules/gulp-clean-css
          through2@2.0.3 /tmp/app/node_modules/gulp-clean-css/node_modules/through2
          readable-stream@2.3.6 /tmp/app/node_modules/gulp-clean-css/node_modules/readable-stream
          isarray@1.0.0 /tmp/app/node_modules/gulp-clean-css/node_modules/isarray
          string_decoder@1.1.1 /tmp/app/node_modules/gulp-clean-css/node_modules/string_decoder
          gulp-concat@2.6.1 /tmp/app/node_modules/gulp-concat
          vinyl@2.2.0 /tmp/app/node_modules/gulp-concat/node_modules/vinyl
          clone@2.1.2 /tmp/app/node_modules/gulp-concat/node_modules/clone
          clone-stats@1.0.0 /tmp/app/node_modules/gulp-concat/node_modules/clone-stats
          replace-ext@1.0.0 /tmp/app/node_modules/gulp-concat/node_modules/replace-ext
          gulp-uglify-es@1.0.4 /tmp/app/node_modules/gulp-uglify-es
          terser@3.17.0 /tmp/app/node_modules/terser
          source-map@0.6.1 /tmp/app/node_modules/terser/node_modules/source-map
          source-map-support@0.5.12 /tmp/app/node_modules/source-map-support
          source-map@0.6.1 /tmp/app/node_modules/source-map-support/node_modules/source-map
          vinyl@2.2.0 /tmp/app/node_modules/gulp-uglify-es/node_modules/vinyl
          clone@2.1.2 /tmp/app/node_modules/gulp-uglify-es/node_modules/clone
          clone-stats@1.0.0 /tmp/app/node_modules/gulp-uglify-es/node_modules/clone-stats
          replace-ext@1.0.0 /tmp/app/node_modules/gulp-uglify-es/node_modules/replace-ext
          Installing any new modules (package.json)
   -----> Checking and configuring service extensions after installing dependencies
   -----> Installing App Management
   Checking for Dynatrace credentials
   No Dynatrace Service Found (service with substring dynatrace not found in VCAP_SERVICES)
   -----> Caching build
          Clearing previous node cache
          Saving 2 cacheDirectories (default):
          - node_modules
          - bower_components (nothing to cache)
   -----> Build succeeded!
          ├── @google/chatbase@1.1.2
          ├── body-parser@1.18.2
          ├── botbuilder@3.15.0
          ├── cloudant@1.10.0-NOTICE
          ├── compression@1.7.4
          ├── cors@2.8.4
          ├── dotenv@2.0.0
          ├── express@4.16.1
          ├── gulp-rename@1.4.0
          ├── moment@2.22.2
          ├── nano@6.4.4
          ├── request@2.87.0
          ├── slick-carousel@1.8.1
          ├── underscore@1.9.0
          ├── universal-analytics@0.4.17
          ├── watson-developer-cloud@3.13.0
          └── xml-js@1.6.3

   Exit status 0
   Uploading droplet, build artifacts cache...
   Uploading droplet...
   Uploading build artifacts cache...
   Uploaded build artifacts cache (9.2M)
   Uploaded droplet (38.5M)
   Uploading complete
   Cell 630cd827-2dc2-4efa-8c22-ad66afb7fe84 stopping instance f0bc0410-8734-4460-b44e-bf89f9ea9b20
   Cell 630cd827-2dc2-4efa-8c22-ad66afb7fe84 destroying container for instance f0bc0410-8734-4460-b44e-bf89f9ea9b20

Here is the logs from compression not working app

sclevine commented 5 years ago

You appear to be using a vendor-specific fork of a previous implementation of this buildpack. That previous implementation is no longer maintained, and the code is unrelated to the code in this repo.

Do you have the same issue using the latest release of the buildpack in this repo?

DarknessZX commented 5 years ago

Yes, I have create another app, migrate to cflinuxfs3 and use this command cf push my-nodejs-app -b https://github.com/cloudfoundry/nodejs-buildpack to push the app. Still same issue. There is strange thing, My paid account deploy to Sydney got this problem but my other free account deploy to Dallas doesn't have this problem.

sclevine commented 5 years ago

Can you provide a sample app that replicates the behavior on a vanilla Cloud Foundry deployment?

DarknessZX commented 5 years ago

@sclevine https://git.ng.bluemix.net/long.le/anantara-chatbot Here is the sample app. I have a ticket like this for IBM support and they have reproduce the issue using this source.

DarknessZX commented 5 years ago

This is an issue in Sydney API. IBM have fixed this