Githawk: Issue with apollo-codegen

Created on 21 Mar 2018  ·  16Comments  ·  Source: GitHawkApp/GitHawk

I am trying to run GitHawk, but somehow apollo script is not working. API.swift have no content after the script runs.
I am lost on this because globally I have [email protected], the same as the one in the app. 😕

❔ question

Most helpful comment

You probably want to run ‘npm uninstall -g Apollo-codegen’

All 16 comments

screen shot 2018-03-21 at 13 40 45

... and this is weird

What happens if you run npm install from the project dir?

@rnystrom Tried that before, not working. 😕
Probably there is a problem with apollo script?

Sent with GitHawk

Any idea? 💡 @SD10 @BasThomas

Have you followed the installation instructions from the Readme? What is the output for brew install node and npm install? You shouldn't have to run npm install in the beginning; only after you've cloned. I think we should update this documentation to make that more clear.

@BasThomas Sure, I followed the installation instructions. This problem occurred as soon as I pulled the changes from master. Before updating to [email protected] everything was working fine.

Btw, the outputs output for brew install node and npm install:

screen shot 2018-03-22 at 22 02 56
screen shot 2018-03-22 at 22 00 39

@rnystrom Is it necessary to add the apollo script in the repo when the API.swift is there?

Hey @jdisho, sorry I've had little time for GitHawk lately 😭 I did get the same error a few days ago I think when upgrading apollo. I just fixed it in a brutish way by clearing all derived data, restarting simulators, Xcode, and a fresh npm install.

A fresh install of what? 😛

@jdisho hmm I’m really not sure tbh... if the file is empty and the script is writing there’s def a problem with the local install.

Sent with GitHawk

I ran the instructions in a separate clone of the repository and that just worked. 🤔
It does, however, only generate the Freetime-AppCenter scheme (not sure if related), what's up with that @rnystrom?

Sorry, I meant a fresh npm install

Sent with GitHawk

@BasThomas leftover scheme from trying AC, but I already migrated Bitrise to use it. Uses the shared scheme with dummy env vars.

Sent with GitHawk

@jdisho May be your npm install doesn't work properly.

Can you confirm you can find this folder in your repo.

node_modules/apollo-codegen/

Btw, this is what I get when I run project from master branch now.

screen shot 2018-03-23 at 6 24 04 pm

EDIT:

After checking little bit more.

Apollo Build script in our project doesn't use any npm. Instead, it is calling a script called "check-and-run-apollo-codegen.sh". This script is failing for you and saying that it can not find npm

Recent changes from Apollo scripts allows us to use locally installed apollo-codegen - instead of global one.

So may give it a try reinstalling npm itself and make sure that it is in your local bin.

➜ where npm
/usr/local/bin/npm

@rnystrom yeah but it does not generate a normal “GitHawk” scheme :/

Sent with GitHawk

You probably want to run ‘npm uninstall -g Apollo-codegen’

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rnystrom picture rnystrom  ·  3Comments

BasThomas picture BasThomas  ·  3Comments

rnystrom picture rnystrom  ·  3Comments

jessesquires picture jessesquires  ·  3Comments

BasThomas picture BasThomas  ·  3Comments