Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

When creating a new project with the command create-graphback it errors out #2271

Open
JWBrownie opened this issue Feb 23, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@JWBrownie
Copy link

  • Module: create-graphback
  • Version: 1.1.1
  • Node.js / npm versions: 14.15.0 / 6.14.8
  • When creating a project with the following command npx create-graphback {project_name}

I am working in a WSL2 Ubuntu 20.04.1 LTS I am using nvm and tried with versions v12.18.4 and v14.15.0 both throw the same error which I am attaching to this bug report.

vudrok@localhost:~/work$ npx create-graphback MyGraphBackProject
   ____                          _       _                      _
  / ___|  _ __    __ _   _ __   | |__   | |__     __ _    ___  | | __
 | |  _  | '__|  / _` | | '_ \  | '_ \  | '_ \   / _` |  / __| | |/ /
 | |_| | | |    | (_| | | |_) | | | | | | |_) | | (_| | | (__  |   <
  \____| |_|     \__,_| | .__/  |_| |_| |_.__/   \__,_|  \___| |_|\_\
                        |_|
create-graphback can create your app from following templates:

apollo-fullstack-react-postgres-ts:
Apollo GraphQL Server connecting to Postgres database and React client using TypeScript

apollo-fullstack-react-mongo-ts:
Apollo GraphQL Server connecting to Mongo database and React client using TypeScript

apollo-mongo-server-ts:
Apollo GraphQL Server connecting to Mongo database using TypeScript

apollo-mongo-datasync-server-ts:
Apollo GraphQL Server connecting to Mongo database using TypeScript. Contains Data Synchronization features.

apollo-postgres-server-ts:
Apollo GraphQL Server connecting to Postgres database using TypeScript

[Community] apollo-mongo-apache-kafka-server-ts:
Apollo GraphQL server connecting to MongoDB database with Apache Kafka for subscriptions. This is a preview template - we are continuing to enhance it - we welcome your feedback.

? Choose a template to bootstrap apollo-postgres-server-ts

Bootstraping graphql server 💫 ✨
⠋ Downloading starter from https://api.github.com/repos/aerogear/graphback/tarball/templates-1.0.0create-graphback <name>

Create Graphback project from available templates

Positionals:
  name  Project name                                                    [string]

Options:
      --templateName  Name of the predefined template                   [string]
      --templateUrl   GitHub URL of the template. For example
                      (https://github.com/wtrocki/graphql-serve-example#master)
                                                                        [string]
      --filter        A filter option used to limit the number of displayed
                      templates that only matches it. For example "postgres"
                      will only display templates that have a Postgres backed
                                                                        [string]
  -h, --help          Show help                                        [boolean]
  -v, --version       Show version number                              [boolean]

TypeError: request_1.default is not a function
    at /home/vudrok/.nvm/versions/node/v12.18.4/lib/node_modules/create-graphback/dist/init/starterTemplates.js:140:30
    at new Promise (<anonymous>)
    at /home/vudrok/.nvm/versions/node/v12.18.4/lib/node_modules/create-graphback/dist/init/starterTemplates.js:139:15
    at Generator.next (<anonymous>)
    at /home/vudrok/.nvm/versions/node/v12.18.4/lib/node_modules/create-graphback/node_modules/tslib/tslib.js:115:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/home/vudrok/.nvm/versions/node/v12.18.4/lib/node_modules/create-graphback/node_modules/tslib/tslib.js:111:16)
    at downloadRepository (/home/vudrok/.nvm/versions/node/v12.18.4/lib/node_modules/create-graphback/dist/init/starterTemplates.js:133:20)
    at Object.<anonymous> (/home/vudrok/.nvm/versions/node/v12.18.4/lib/node_modules/create-graphback/dist/init/starterTemplates.js:180:32)
    at Generator.next (<anonymous>)
@JWBrownie JWBrownie added the bug Something isn't working label Feb 23, 2021
@namit-chandwani
Copy link
Member

This was fixed by PR #2267, just hasn't been released yet.
@craicoverflow Can you please release a new version of the create-graphback package that includes this bug fix?

@namit-chandwani
Copy link
Member

@JWBrownie The fix for this issue has now been included in the latest release of Graphback.
It should work fine now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants