Skip to content

Failed to compile droplet: Failed to run all supply scripts #13

@jlouis-onrr

Description

@jlouis-onrr

Trying out the nodejs sample nearly verbatim, but still seeing errors. When trying to build app. 😕

Manifest:

applications:
- name: strapi-cms
  buildpacks:
    - nodejs_buildpack
  memory: 1024M
  disk_quota: 4096M
  command: NODE_ENV=production npm run build

Procfile:
web: node server.js

Output:

Creating app strapi-cms...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 77.15 MiB / 77.15 MiB [=============================================================================================================================] 100.00% 1m51s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading nodejs_buildpack...
   Downloaded nodejs_buildpack
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 creating container for instance 583e0d2c-0a4f-4ac5-bf57-733277718c2a
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 successfully created container for instance 583e0d2c-0a4f-4ac5-bf57-733277718c2a
   Downloading app package...
   Downloaded app package (138.9M)
   -----> Nodejs Buildpack version 1.7.32
   -----> Installing binaries
          engines.node (package.json): >=10.16.0 <=14.x.x
          engines.npm (package.json): >=6.0.0
          **WARNING** Dangerous semver range (>) in engines.node. See: http://docs.cloudfoundry.org/buildpacks/node/node-tips.html
   -----> Installing node 12.19.0
          Download [https://buildpacks.cloudfoundry.org/dependencies/node/node_12.19.0_linux_x64_cflinuxfs3_03ab83e5.tgz]
          npm 6.14.8 already installed with node
   -----> Installing yarn 1.22.10
          Download [https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn_1.22.10_linux_noarch_any-stack_0057c1c9.tgz]
          Installed yarn 1.22.10
   -----> Creating runtime environment
          NODE_ENV=production
          NODE_HOME=/tmp/contents722639036/deps/0/node
          NODE_MODULES_CACHE=true
          NODE_VERBOSE=false
          NPM_CONFIG_LOGLEVEL=error
          NPM_CONFIG_PRODUCTION=true
   -----> Building dependencies
          Installing node modules (yarn.lock)
          Running yarn in online mode
          To run yarn in offline mode, see: https://yarnpkg.com/blog/2016/11/24/offline-mirror
   yarn install v1.22.10
   [1/4] Resolving packages...
   [2/4] Fetching packages...
   warning url-loader@1.1.2: Invalid bin field for "url-loader".
   info fsevents@2.1.3: The platform "linux" is incompatible with this module.
   info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
   info fsevents@1.2.13: The platform "linux" is incompatible with this module.
   info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
   [3/4] Linking dependencies...
   warning "strapi-admin > bootstrap@4.5.3" has unmet peer dependency "jquery@1.9.1 - 3".
   warning "strapi-admin > bootstrap@4.5.3" has unmet peer dependency "popper.js@^1.16.1".
   warning "strapi-plugin-users-permissions > grant-koa@5.2.0" has unmet peer dependency "koa@>=2.0.0".
   warning " > strapi-connector-bookshelf@3.3.2" has incorrect peer dependency "knex@^0.20.0".
   [4/4] Building fresh packages...
   error /tmp/app/node_modules/sharp: Command failed.
   Exit code: 1
   Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
   Arguments: 
   Directory: /tmp/app/node_modules/sharp
   Output:
   ERR! sharp 'darwin-x64' binaries cannot be used on the 'linux-x64' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'linux-x64' platform.
   info sharp Attempting to build from source via node-gyp but this may fail due to the above error
   info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
   make: Entering directory '/tmp/app/node_modules/sharp/build'
     TOUCH Release/obj.target/libvips-cpp.stamp
     CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
     AR(target) Release/obj.target/node_modules/node-addon-api/nothing.a
     COPY Release/nothing.a
     CXX(target) Release/obj.target/sharp/src/common.o
     CXX(target) Release/obj.target/sharp/src/metadata.o
     CXX(target) Release/obj.target/sharp/src/stats.o
     CXX(target) Release/obj.target/sharp/src/operations.o
     CXX(target) Release/obj.target/sharp/src/pipeline.o
     CXX(target) Release/obj.target/sharp/src/utilities.o
     CXX(target) Release/obj.target/sharp/src/sharp.o
     SOLINK_MODULE(target) Release/obj.target/sharp.node
   /usr/bin/ld: cannot find -l:libvips-cpp.so.42
   /usr/bin/ld: cannot find -l:libvips.so.42
   collect2: error: ld returned 1 exit status
   sharp.target.mk:173: recipe for target 'Release/obj.target/sharp.node' failed
   make: Leaving directory '/tmp/app/node_modules/sharp/build'
   make: *** [Release/obj.target/sharp.node] Error 1
   gyp ERR! build error 
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/tmp/contents722639036/deps/0/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
   gyp ERR! System Linux 4.15.0-122-generic
   gyp ERR! command "/tmp/contents722639036/deps/0/node/bin/node" "/tmp/contents722639036/deps/0/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
   gyp ERR! cwd /tmp/app/node_modules/sharp
   gyp ERR! node -v v12.19.0
   gyp ERR! node-gyp -v v5.1.0
   gyp ERR! not ok
   info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
          **ERROR** Unable to build dependencies: exit status 1
   Failed to compile droplet: Failed to run all supply scripts: exit status 14
   Exit status 223
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 stopping instance 583e0d2c-0a4f-4ac5-bf57-733277718c2a
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 destroying container for instance 583e0d2c-0a4f-4ac5-bf57-733277718c2a
Error staging application: App staging failed in the buildpack compile phase
FAILED
jerome@Ludwig strapi-cms % cf set-env strapi-cms  OPTIMIZE_MEMORY true
Setting env variable 'OPTIMIZE_MEMORY' for app strapi-cms in org sandbox-onrr / space jerome.louis as jerome.louis@onrr.gov...
OK
TIP: Use 'cf restage strapi-cms' to ensure your env variable changes take effect
jerome@Ludwig strapi-cms % cf restage strapi-cms
This action will cause app downtime.

Restaging app strapi-cms in org sandbox-onrr / space jerome.louis as jerome.louis@onrr.gov...

Staging app and tracing logs...
   Downloading nodejs_buildpack...
   Downloaded nodejs_buildpack
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 creating container for instance 18909f6f-c48b-485b-9a00-1d5e88713d13
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 successfully created container for instance 18909f6f-c48b-485b-9a00-1d5e88713d13
   Downloading app package...
   Downloaded app package (138.9M)
   -----> Nodejs Buildpack version 1.7.32
   -----> Installing binaries
          engines.node (package.json): >=10.16.0 <=14.x.x
          engines.npm (package.json): >=6.0.0
          **WARNING** Dangerous semver range (>) in engines.node. See: http://docs.cloudfoundry.org/buildpacks/node/node-tips.html
   -----> Installing node 12.19.0
          Download [https://buildpacks.cloudfoundry.org/dependencies/node/node_12.19.0_linux_x64_cflinuxfs3_03ab83e5.tgz]
          npm 6.14.8 already installed with node
   -----> Installing yarn 1.22.10
          Download [https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn_1.22.10_linux_noarch_any-stack_0057c1c9.tgz]
          Installed yarn 1.22.10
   -----> Creating runtime environment
          NODE_ENV=production
          NODE_HOME=/tmp/contents051559757/deps/0/node
          NODE_MODULES_CACHE=true
          NODE_VERBOSE=false
          NPM_CONFIG_LOGLEVEL=error
          NPM_CONFIG_PRODUCTION=true
   -----> Building dependencies
          Installing node modules (yarn.lock)
          Running yarn in online mode
          To run yarn in offline mode, see: https://yarnpkg.com/blog/2016/11/24/offline-mirror
   yarn install v1.22.10
   [1/4] Resolving packages...
   [2/4] Fetching packages...
   warning url-loader@1.1.2: Invalid bin field for "url-loader".
   info fsevents@2.1.3: The platform "linux" is incompatible with this module.
   info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
   info fsevents@1.2.13: The platform "linux" is incompatible with this module.
   info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
   [3/4] Linking dependencies...
   warning "strapi-admin > bootstrap@4.5.3" has unmet peer dependency "jquery@1.9.1 - 3".
   warning "strapi-admin > bootstrap@4.5.3" has unmet peer dependency "popper.js@^1.16.1".
   warning "strapi-plugin-users-permissions > grant-koa@5.2.0" has unmet peer dependency "koa@>=2.0.0".
   warning " > strapi-connector-bookshelf@3.3.2" has incorrect peer dependency "knex@^0.20.0".
   [4/4] Building fresh packages...
   error /tmp/app/node_modules/sharp: Command failed.
   Exit code: 1
   Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
   Arguments: 
   Directory: /tmp/app/node_modules/sharp
   Output:
   ERR! sharp 'darwin-x64' binaries cannot be used on the 'linux-x64' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'linux-x64' platform.
   info sharp Attempting to build from source via node-gyp but this may fail due to the above error
   info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
   make: Entering directory '/tmp/app/node_modules/sharp/build'
     TOUCH Release/obj.target/libvips-cpp.stamp
     CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
     AR(target) Release/obj.target/node_modules/node-addon-api/nothing.a
     COPY Release/nothing.a
     CXX(target) Release/obj.target/sharp/src/common.o
     CXX(target) Release/obj.target/sharp/src/metadata.o
     CXX(target) Release/obj.target/sharp/src/stats.o
     CXX(target) Release/obj.target/sharp/src/operations.o
     CXX(target) Release/obj.target/sharp/src/pipeline.o
     CXX(target) Release/obj.target/sharp/src/utilities.o
     CXX(target) Release/obj.target/sharp/src/sharp.o
     SOLINK_MODULE(target) Release/obj.target/sharp.node
   /usr/bin/ld: cannot find -l:libvips-cpp.so.42
   /usr/bin/ld: cannot find -l:libvips.so.42
   collect2: error: ld returned 1 exit status
   sharp.target.mk:173: recipe for target 'Release/obj.target/sharp.node' failed
   make: *** [Release/obj.target/sharp.node] Error 1
   make: Leaving directory '/tmp/app/node_modules/sharp/build'
   gyp ERR! build error 
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/tmp/contents051559757/deps/0/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
   gyp ERR! System Linux 4.15.0-122-generic
   gyp ERR! command "/tmp/contents051559757/deps/0/node/bin/node" "/tmp/contents051559757/deps/0/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
   gyp ERR! cwd /tmp/app/node_modules/sharp
   gyp ERR! node -v v12.19.0
   gyp ERR! node-gyp -v v5.1.0
   gyp ERR! not ok
   info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
          **ERROR** Unable to build dependencies: exit status 1
   Failed to compile droplet: Failed to run all supply scripts: exit status 14
   Exit status 223
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 stopping instance 18909f6f-c48b-485b-9a00-1d5e88713d13
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 destroying container for instance 18909f6f-c48b-485b-9a00-1d5e88713d13
Error staging application: App staging failed in the buildpack compile phase
FAILED

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions