The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
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
matteo.morreale4
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.
mmczaplinski8
Haha, glad you āsolvedā it then
luisherranz9
@matteo.morreale is this a problem with npx frontity or only with npx frontity create? What happens if you try npx frontity info?
matteo.morreale10
Hi, sorry if Iāve delayed my reply but I was working on Linux environment and I wasnāt able to move to Windows
Other commands, not frontity one, still works fine.
luisherranz11
It certainly looks like the npx problem with spaces in the user name: Mateo Morreale.
I donāt understand why npx create-react-app works. Did you install it globally? Does it work with create-react-app (no npx)?
You can solve the npx problem with spaces with these instructions:
matteo.morreale12
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
luisherranz13
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ā¦
matteo.morreale14
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ā¦
luisherranz15
No problem Mateo, Iām glad that at least itās solved in your Windows environment
mariano.paz.flores16
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!