keystone
keystone copied to clipboard
Problem with setting up a project without TypeScript
Discussed in https://github.com/keystonejs/keystone/discussions/7535
Originally posted by zeepsopje May 14, 2022 I've been trying to setup Keystone 6 for a project, but it's unclear to me how to setup it up without typescript. Although the docs point out the steps to do so, I'm getting the following message after exactly following the steps mentioned in this guide from the docs:
It looks like you're trying to use TypeScript but do not have the required package(s) installed.
Please install typescript by running:
npm install --save-dev typescript
If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).
error Command failed with exit code 1.
This happens after running yarn keystone dev. I can confirm there is no usage of TS inside of my project.
Any one who's managed to get this up and running without typescript? The create-keystone-app utility hasn't given me the choice to not use TS so I was hoping a manual approach would do the trick.
Context: Node: 16.15.0 Yarn: 1.22.18 OS: Arch Linux
Yeah I think I had to add typescript to my dev dependencies. For some reason the keystone dev command requires it. But you can remove the typescript config file etc.
FYI workaround for this currently is to just have typescript in the dependency list but not actually use it. (will generate IDE intellisense errors).
Cannot reproduce, keystone.js works as intended now.
Reproduced this problem, keystone build and keystone dev, using a plain keystone.js entry, still results in yarn adding typescript to your devDependencies.
$ keystone build
✨ Building Keystone
✨ Generating Admin UI code
✨ Building Admin UI
info - Skipping validation of types
info - Skipping linting
It looks like you're trying to use TypeScript but do not have the required package(s) installed.
Installing dependencies
If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).
Installing devDependencies (yarn):
- typescript