Keystone: npm init keystone-app my-app fails

Created on 28 Dec 2019  路  18Comments  路  Source: keystonejs/keystone

Hi

I am following the getting started documentation and I am getting this error when I run

npm init keystone-app my-app

npx: installed 61 in 15.448s
(node:10908) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at Colorize (C:UsersdevAppDataRoamingnpm-cache_npx10484node_modulescreate-keystone-appnode_modulescfontslibindex.js:328:69)
at AddLetterSpacing (C:UsersdevAppDataRoamingnpm-cache_npx10484node_modulescreate-keystone-appnode_modulescfontslibindex.js:412:17)
at Render (C:UsersdevAppDataRoamingnpm-cache_npx10484node_modulescreate-keystone-appnode_modulescfontslibindex.js:788:14)
at Object.Say [as say] (C:UsersdevAppDataRoamingnpm-cache_npx10484node_modulescreate-keystone-appnode_modulescfontslibindex.js:884:15)
at showWelcomeMessage (C:UsersdevAppDataRoamingnpm-cache_npx10484node_modulescreate-keystone-applibshow-welcome-message.js:4:10)
at C:UsersdevAppDataRoamingnpm-cache_npx10484node_modulescreate-keystone-appbincli.js:14:3
at Object. (C:UsersdevAppDataRoamingnpm-cache_npx10484node_modulescreate-keystone-appbincli.js:22:3)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
(node:10908) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10908) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Most helpful comment

馃憢馃徎 Syntax listeners!

All 18 comments

experienced same issue using yarn create

Same for me. Neither npm or yarn install works at the moment.

I also have this problem.

Same issue.

Having the same issue

Same problem here.

I have tried both npm init and yarn create commands to create the app on several versions of Node.js (10, 12 and 13), both on macOS and Ubuntu 18.04.

This seems to be caused by the recent release 2.4.6 of cfonts.

A nasty work-around:

mkdir my-project-starter
cd my-project-starter

npm init -y # Initialise an empty project
npm install -D create-keystone-app # Manually install Keystone starter
rm -fr node_modules/cfonts # Get rid of troublesome cfonts

Edit node_modules/create-keystone-app/package.json and change the cfonts dependency from "^2.4.4" to "2.4.5". Notice, we are hard-coding the version known to be working.

npm install

npx create-keystone-app my-project

If it's still failing, try removing _node_modules/cfonts_ and running npm install again.

Same problem here.
Also didn't worked for me with trying the solution from @chris-kobrzak .

I'm having the same issue. I was all excited to try out keystone after the syntax episode today

Same here 馃憥

Same, npm and yarn.

jumping on this bandwaggon, doesn't work for me either :(

Me neither. Neither npm nor yarn works.

This should be fixed via #2188
I just checked that it works with the latest.

it works..
image

馃憢馃徎 Syntax listeners!

Same issue on npm and yarn, its 2020.

Same issue on npm and yarn, its 2021.

@Yinear The original issue has been fixed and I just verified that it has so can you please add more details so we know what you mean. Step me through what you're doing to make it fail?

Running npm init keystone-app my-app on node v14 works just fine for me:
Screen Shot 2020-12-29 at 6 10 31 pm

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cowjen01 picture cowjen01  路  13Comments

jesstelford picture jesstelford  路  14Comments

molomby picture molomby  路  11Comments

ra-external picture ra-external  路  10Comments

molomby picture molomby  路  11Comments