Strapi Version: 4.0.4
Operating System: Windows Server 2019
Node Version: 16.15.0
NPM Version: 8.5.5
Yarn Version: -
I’m getting this error when accessing the /admin page :
I’ve tried a couple of things but wasn’t able to fix it :
Any ideas on what it could be? Any help would be appreciated.
PS. I know the Strapi version is older and planning on updating it soon, but don’t think that will cause an issue.
Okay, I’ve fixed it.
Ran npm audit fix --force & it fixed the issue.
PS. It also upgraded the version to 4.2.2
I tried this and it didnt work for me.
Did you ever sort out this issue?
Please let me know.
As answered in the post in the link below:
I had to downgrade Node to LTS version 16.19.0. It then installed npm v8.19.3. Previously I had the latest version of Node 18.x.x
Use guide to downgrade: NVM for Windows – How to Download and Install Node Version Manager in Windows 10
Then when I ran
npx create-strapi-app@latest backend --quickstart, it ran successfully and the Strapi admin page loaded in localhost server.
However, as being discussed in a different post related to the same topic below:
Downgrading can work but you actually need build tools
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe
failed with exit code: 1
Thank you for downloading Visual Studio - Visual Studio since your build tools is older then your node version hence why it might work with older versions.
Also a small tip don’t use OneDrive to have your projects 1, it takes massive space you might also get time outs as windows tries to write to disk and sync to the sky.
I hope this helps.