Admin Panel blank after upgrade from v3.5.1 to v3.6.5

Hi Guys,

Today I upgraded my Strapi from v.3.5.1 to v3.6.5. Unfortunately, the admin login page has become blank and I get the error message below:

Who can give me a tip where the problem is?

Thank you in advance!

Any error log from Strapi console?

@tiz no error log, nothing. :frowning:

Did you rebuild the Admin panel?

@DMehaffy Hello Derrick, my Localhost admin panel runs again, but on Heroku still not. Can I rebuild the Admin panel on Heroku?

That one is most likely due to not having the url key set in your server.js. Can you post your server.js file here? (It’s located in either ./config/server.js or you may also have a ./config/env/production/server.js)

@DMehaffy Sure, of course!

const forgotPasswordTemplate = require('./email-templates/forgot-password');

module.exports = ({ env }) => ({

  host: env('HOST', '0.0.0.0'),

  port: env.int('PORT', 1337),

  url: env('URL_PUBLIC'),

  admin: {

    auth: {

      secret: env('JWT_SECRET_ADMIN'),

    },

    url: env('URL_ADMIN'),

    forgotPassword: {

      from: env('EMAIL_NO_REPLY'),

      replyTo: env('EMAIL_NO_REPLY'),

      emailTemplate: forgotPasswordTemplate,

    },

  },

  cron: { enabled: true }

});

Hi @mingxi could you share what your URL_ADMIN and URL_PUBLIC values are?

Hi @Richard_Nsama ,

since I don’t want to publish the two values here, I’ll write them to you via https://support.strapi.io.

Thanks in advance!

I have seen that and here’s what resolved it for me:
npm install → white admin page // yarn install → good admin page !!!
Once it was working, I did not dig further.
Hope this helps.

1 Like

Thanks for your tip! Via yarn I can also build the admin panel, but only on localhost. On Heroku it only runs via npm, right? Do you happen to know how to deploy strapi on Heroku via Yarn.

It’s been some time since I’ve used Heroku, and I don’t remember what you can and can’t do there. (I’m running my Strapi backend on an AWS EC2 instance.) It’s pretty much all NPM, but I just now use yarn for the INSTALL step:
[log on to server and navigate to project subdirectory]
git pull
npm install → white admin page // yarn install → good admin page !!!
NODE_ENV=production npm run build
cd…
pm2 unstartup (then paste and run generated command)
pm2 startup (then paste and run generated command)
pm2 start ecosystem.config.js
pm2 save

1 Like

Hi @mingxi, I’ve attempted to reproduce this issue at least twice and it doesn’t seem to yield the same result. @DMehaffy also took a look and created a test repo on github with his example and wasn’t able to reproduce it either. I’ve added the link here and if possible you can cross reference between his example code and your codebase to spot differences in the project configuration.

1 Like

Hi Guys,

I got it! :grinning: :beer:

The problem was at the NPM version number. Heroku tries to install the lowest version of NPM. Install in my case “npm ^ 6.0.0 installed”.

So I set in “Package.json”:
“Engines”: {
“Node”: “> = 12.22.1 <= 14.x.x”,
“NPM”: “7.19.0”
},

The version “NPM” is crucial.

Thanks anyway: @Richard_Nsama @DMehaffy @pjamieson

:sleeping:

Best regards!

Good to know. Thanks!

1 Like

Hi @mingxi thanks for the info. I will strongly recommend you read through these docs as well about recommended environment configuration for Strapi. Specifically the part that talks about the Node and NPM versions Strapi supports.

1 Like

@Richard_Nsama Yes, I know the site, but this time “npm (version 6.x minimum) …” for Strapi v3.6.5 didn’t really work everywhere. :snail:

Just as a supplement: I have downgraded the NPM version from v7 to v6.14.13. - It works! :beer:

2 Likes