Error when running npx frontity create

Hi,
I get this error when I run npx frontity create

npx: installed 147 in 16.426s
⨯ Unable to compile TypeScript:
error TS5023: Unknown compiler option ‘esModuleInterop’.error TS5023: Unknown compiler option ‘resolveJsonModule’.

I’m running
npm/x - 6.11.2,
node -11.2.0
typescript 3.5.3

I’d be grateful for any help,

Many thanks,
Stephen

Hey @stephenh1988, welcome to the community :slight_smile:

This problem is usually because the "resolveJsonModule" option of the tsconfig.json file is missing or false. But Frontity uses an internal tsconfig.json with everything configured properly, so I wonder why is failing in your computer.

Are you trying to install Frontity in a folder that already contains a package.json with a tsconfig.json file? Or what is exactly your setup?

Hi @luisherranz thanks for replying. I was just running npx frontity create in a clean directory.

I finally resolved this by running the command as sudo - presumably, I’ve installed npm as root and somewhere down the dependency tree its meeting a permissions error which for some reason bubbles up as an ‘unknown compiler option’ :man_shrugging:

Oh, I see, thanks for the answer.

You may want to fix that, I don’t think running npm installs as sudo is a good idea.

You can look into nvm which makes node local to your home folder and also simplifies node and npm updates.