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

Error in 0.0.4 when running publish on Node alpine image #402

Closed
Hilaryous opened this issue Mar 30, 2021 · 2 comments
Closed

Error in 0.0.4 when running publish on Node alpine image #402

Hilaryous opened this issue Mar 30, 2021 · 2 comments
Labels
Milestone

Comments

@Hilaryous
Copy link

Description

When running rover subgraph publish --schema=schema.graphql --name=[service name] --routing-url=[service url] [graph name]@dev

I see this error:

Error: spawnSync /usr/local/share/.config/yarn/global/node_modules/binary-install/bin/rover ENOENT
    at Object.spawnSync (internal/child_process.js:1067:20)
    at spawnSync (child_process.js:602:24)
    at Binary.run (/usr/local/share/.config/yarn/global/node_modules/binary-install/index.js:84:20)
    at run (/usr/local/share/.config/yarn/global/node_modules/@apollo/rover/binary.js:71:10)
    at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/@apollo/rover/run.js:4:1)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawnSync /usr/local/share/.config/yarn/global/node_modules/binary-install/bin/rover',
  path: '/usr/local/share/.config/yarn/global/node_modules/binary-install/bin/rover',
  spawnargs: [
    'subgraph',
    'publish',
    '--schema=schema.graphql',
    '--name=[service name]',
    '--routing-url=[service url]',
    '[graph name]@dev'
  ]
}

Steps to reproduce

Run yarn global add @apollo/rover@0.0.4, then
rover subgraph publish --schema=schema.graphql --name=[service name] --routing-url=[service url] [graph name]@dev
using a node:lts-alpine image.

Expected result

I should be able publish the schema

Actual result

I cannot publish the schema

Environment

  • Operating system and version: node:lts-alpine (node version 14.16.0, alpine version 3.11) Link to Dockerfile
  • Shell (bash/zsh/powershell): bash
  • Version of Rover (rover --help): 0.0.4
  • Apollo Studio Plan: enterprise
  • Installation method: yarn

Note

I see #375 about 0.0.4 and alpine, but this seemed to be a different issue.

@abernix
Copy link
Member

abernix commented Apr 1, 2021

I suspect that #375 is still relevant as ENOENT is also saying "No such file or directory". For example, this happens even just running rover --version after installing the @apollo/rover package.

As a suggestion you may find useful, you could leverage Docker multi-stage builds to run Rover using a different image while still getting your app into an Alpine Node image. Depending on where in your build you need the rover subgraph publish command to run, the actual form the Dockerfile would take on could vary.

(I realize this isn't the real solution for having this command just work in Alpine, but I'm willing to try and help craft a workaround if there's an existing Dockerfile you can share a snippet of.)

@lrlna lrlna modified the milestones: June 8, June 22 Apr 8, 2021
@EverlastingBugstopper
Copy link
Contributor

Closing this in favor of #537

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

No branches or pull requests

4 participants