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

Broken 'create-tables' script (missed cross-env) #2803

Closed
nzxt opened this issue Apr 22, 2020 · 0 comments · Fixed by #2804 or #2800
Closed

Broken 'create-tables' script (missed cross-env) #2803

nzxt opened this issue Apr 22, 2020 · 0 comments · Fixed by #2804 or #2800

Comments

@nzxt
Copy link

nzxt commented Apr 22, 2020

Bug report

Describe the bug

When initializing Keystone, after the process is finished script 'create-tables' in package.json has no 'cross-env' before variable 'CREATE_TABLE=true'. It causes error while running 'yarn create-tables'.

To Reproduce

  1. Go to console and type 'yarn create keystone-app project-name'
  2. Answer all questions:
√ What is your project name? ... project-name
√ Select a starter project » Starter (Users + Authentication)
√ Select a database type » PostgreSQL
√ Where is your database located? ... postgres://username:password@localhost/project-name   
√ Test database connection? ... No / **Yes**
√ Successfully connected to postgres://username:password@localhost/project-name
√ Copying project files
Installing dependencies with yarn. This will take a few minutes.
√ Installed dependencies

  �  Keystone created a starter project in: project-name

  Before you run Keystone you will need to initiali**s**e the tables in your database:  
  - yarn create-tables
  1. Run 'yarn create-tables'
  2. See error
'CREATE_TABLES' is not recognized as an internal or external command,
operable program or batch file.

Expected behavior

The script should run and tables must be populated with initial data.

Screenshots

image

System information

  • OS: [Windows 10]
  • Node 12.x
  • Yarn 1.22

Additional context

After adding 'cross-env' before CREATE_TABLES variable all seem to be good.

"create-tables": "cross-env CREATE_TABLES=true keystone create-tables"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant