Running `yarn install` when using `create-keystone-app ` causes `Error: spawn keystone ENOENT`
See original GitHub issueWhat I did
Followed the “Quick Start” instructions (https://v5.keystonejs.com/quick-start/) to get up and running with a fresh Keystone instance:
yarn create keystone-app my-app
cd my-app
yarn start
Woohoo! Keystone is running and I’m happy, until I find myself clearing my node modules folder:
rm -rf ./node_modules
yarn install
yarn start
What I expected to see
A happy instance of Keystone starting up all its services:
$ cross-env NODE_ENV=development DISABLE_LOGGING=true keystone dev
ℹ Command: keystone dev
✔ Validated project entry file ./index.js
✔ Keystone server listening on port 3000
✔ Initialised Keystone instance
✔ Connected to database
✔ Keystone instance is ready 🚀
🔗 Keystone Admin UI: http://localhost:3000/admin
🔗 GraphQL Playground: http://localhost:3000/admin/graphiql
🔗 GraphQL API: http://localhost:3000/admin/api
What I saw
I get Node’s ENOENT
error and can’t start the app. There’s no keystone
in ./node_modules/bin
, even after running yarn install
.
$ cross-env NODE_ENV=development DISABLE_LOGGING=true keystone dev
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn keystone ENOENT`
During this yarn install
step I see Yarn throwing some warnings, most of which I ignore, except this one:
warning Pattern ["@keystone-alpha/keystone@latest"] is trying to unpack in the same destination "/Users/thinkmill/Library/Caches/Yarn/v4/npm-@keystone-alpha-keystone-7.0.2-cc60ffc0cc65735f413f65131679c1679f4ae5d2/node_modules/@keystone-alpha/keystone" as pattern ["@keystone-alpha/keystone@^7.0.0","@keystone-alpha/keystone@^7.0.0"]. This could result in non-deterministic behavior, skipping.
If I run npm install
I don’t see any such warning and the app fires up quite happily.
Also: in package.json
if I change "@keystone-alpha/keystone": "latest,
to "@keystone-alpha/keystone": "7.0.2",
the yarn install
works just fine.
System
- Yarn:
v1.15.2
- Node:
v10.15.3
@keystone-alpha/keystone
:v7.0.2
@keystone-alpha/create-keystone-app
:v0.6.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
npm - Why does "yarn install" raise an ENOENT error when ...
I'm trying to migrate to Yarn. When I run yarn install in the console, it gives me an error: An unexpected error occurred:...
Read more >I get this error when running $ npm start , following setup steps ...
to Keystone JS. I get this error when running $ npm start , following setup steps on website. 0 info it worked if...
Read more >How to fix the installing packages with yarn trace error spawn ...
One of them is the Installing packages with yarnTrace: { Error: spawn yarn ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) ...
Read more >VNK - ALBA.Net
#definition 2160 matthews ave bronx, Illustrator cs3 tutorial german, 1971 chrysler 300 coupe, Average bed rest with twins, Access 3112 error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gautamsi I assume when you run your workaround, it sets the version on the dependency to not be
"latest"
which would imply that fix also works for you?New CLI now 😃 This issue is resolved