0

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?

Kas Elvirov
  • 7,394
  • 4
  • 40
  • 62
Ajmal faiz
  • 111
  • 1
  • 6

2 Answers2

2

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.

0

Try using this command:

npm i @frontity/core 

It Works.

Osadhi Virochana
  • 1,294
  • 2
  • 11
  • 21