Ajmal faiz
Ajmal faiz

Reputation: 181

npm ERR! code ENOLOCAL while installing frontity

C:\WINDOWS\system32>npx frontity create my-app && cd my-app

npm ERR! code ENOLOCAL npm ERR! Could not install from "wolf\AppData\Roaming\npm-cache_npx\4608" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Mystic wolf\AppData\Roaming\npm-cache_logs\2019-12-13T06_42_07_591Z-debug.log Install for frontity@latest failed with code 1

i have tried clearing npm cache, upgrading npm version but cant solve it. i feel like there is something is wrong with package.json how to fix?

Upvotes: 0

Views: 1389

Answers (2)

Johaa Jnr
Johaa Jnr

Reputation: 1

Try using this command:

npm i @frontity/core 

It Works.

Upvotes: 0

Reyes Martinez
Reyes Martinez

Reputation: 21

It seems like it is a problem of npx when the user folder contains an space (Mystic wolf)

You need to move the npm cache to a folder without spaces.

First, open cmd as Administrator.

  • Search for cmd
  • Right click
  • Choose “Run as Administrator”
  • Enter your password

run-as-administrator-screenshot

Then enter these commands in the console:

> mklink /J "C:\Users\mystic-wolf" "C:\Users\Mystic wolf"
> npm config set cache C:\Users\mystic-wolf\AppData\Roaming\npm-cache
> npm config set prefix C:\Users\mystic-wolf\AppData\Roaming\npm
> npm cache clean --force

You have more info here: https://community.frontity.org/t/error-running-npx/512/8.

Upvotes: 2

Related Questions