Hi,
Iāve a problem with the frontity installation, since itās giving me an error on a Windows machine.
I use this machine for random developing while travelling and I need to keep it on Windows, but I never had problems with react apps before (as example: npx create-react-app myapp works fine).
NPX is giving me this error (screenshot attached) and Iāve to say.
Iām lost, whatās up?
C:\esercizi\react>npx frontity create my-app && cd my-app
Error: EEXIST: file already exists, mkdir āC:\Users\Matteoā
TypeError: Cannot read property āloadedā of undefined
at exit (C:\nvm\v12.14.0\node_modules\npm\lib\utils\error-handler.js:97:27)
at errorHandler (C:\nvm\v12.14.0\node_modules\npm\lib\utils\error-handler.js:216:3)
at C:\nvm\v12.14.0\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\nvm\v12.14.0\node_modules\npm\lib\npm.js:225:22)
at C:\nvm\v12.14.0\node_modules\npm\lib\npm.js:263:24
at C:\nvm\v12.14.0\node_modules\npm\lib\config\core.js:81:7
at Array.forEach ()
at C:\nvm\v12.14.0\node_modules\npm\lib\config\core.js:80:13
at f (C:\nvm\v12.14.0\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\nvm\v12.14.0\node_modules\npm\lib\config\core.js:171:20)
C:\nvm\v12.14.0\node_modules\npm\lib\utils\error-handler.js:97
var doExit = npm.config.loaded ? npm.config.get(ā_exitā) : true
^
TypeError: Cannot read property āloadedā of undefined
at exit (C:\nvm\v12.14.0\node_modules\npm\lib\utils\error-handler.js:97:27)
at process.errorHandler (C:\nvm\v12.14.0\node_modules\npm\lib\utils\error-handler.js:216:3)
at process.emit (events.js:210:5)
at process._fatalException (internal/process/execution.js:150:25)
Install for [ āfrontity@latestā ] failed with code 7
It seems very much like an issue with node rather than a problem with frontity itself.
In the second screenshot you seem to have run npx frontity frontity-app, but the frontity commad requires an argument like create, create-package, etc. In this case, frontity should have just printed out the help like:
Unknown command: frontity-app
Usage: frontity <command> [options]
Frontity CLI
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
create [options] [name] Creates a new Frontity project.
create-package [options] [name] Creates a new Frontity package in a project.
dev [options] Starts a server in development mode.
build [options] Builds the project for production.
serve [options] Starts a server in production mode.
subscribe <email> Subscribe to Frontity newsletter.
info Get environment information for debugging and issue reporting.
Could you try to following:
clean the npm cache
try again
reinstall npm
try again
check your node installation and reinstall node.
Let us know if youāve managed to solve the problem, cheers
Hi!
Sorry, Iāve tried many times and in this one Iāve lost part of the command but it does not work with create.
Iāve tried by updating npm and clearing the cache but still nothing works,!
Node is on the v12.14.1 now, it was on the v12.14.0 before but still itās not working.
On Linux Iād no problem at all but this is a Windows pc.
Not a fix butā¦ Iāve āsolvedā by installing linux even on this machine.
Still donāt know why it wasnāt working on Windows butā¦ Iāve used as an incentive to move this PC to linux.
Hi luish,
no I havenāt installed it globally, really I donāt know why itās working but all other npx commands are working, only frontity gave me this error here in Windows 10.
Tried what you said in this other post and itās working like a charm, thank you
Ok, maybe thereās something we can do to fix this in our side. For what I see, create-react-app also should have this problem: https://github.com/facebook/create-react-app/issues/4058 so I donāt understand why itās working in your caseā¦
Iād love to help but I donāt have the skills to do that, sorry
By the way in the meantime Iāve switched to Linux so now Iām working on that environment, I cannot even profusely test it anymoreā¦
Awesome Luis , I am new ā¦trying frontity for the first time to see if I can implement it in my job, and I had the same problem but your post about fixing itā¦solve it for meā¦thanks!