strapi / nextjs-corporate-starter

Strapi Demo application for Corporate Websites using Next.js
MIT License
966 stars 287 forks source link

Frontend cannot load #30

Closed spaceo closed 11 months ago

spaceo commented 1 year ago

I get following error in the browser and in Node: Unhandled Runtime Error Error: Cannot read properties of null (reading 'attributes')

image
philotechnic commented 1 year ago

Ran into the same issue and it prevented me from building the project. Rebuilt the project a few times to make sure I was following steps correctly but no success.

PaulBratslavsky commented 1 year ago

@spaceo and @Phillyphus I will take a look at this when get a chance, but in the mean time you can check if a log exists inside your Strapi Admin.

2023-05-25_15-46-08

I will make a video outlining the steps of setting up this project. Just to make it easier to get started with and see if I get the same error.

Thank you both for the feedback.

spaceo commented 1 year ago

I don't know where to find logs in the Strapi admin interface. But if I compare your screenshot with what I see in the global config I notice that I am missing the logo-dark.png image that I see in your screenshot. And the errors I mentioned before are just about that.

spaceo commented 1 year ago

I have now seen other places in Strapi content where images are missing. I see a pattern here :)

cjsewell commented 1 year ago

I had a similar issue where yarn strapi import -f ../seed-data.tar.gz doesn't seem to link all images correctly?

Can work around it by manually setting the missing image relations after importing.

Could this be a bug in the import or a bad seed-data.tar.gz?

PaulBratslavsky commented 1 year ago

@spaceo @cjsewell thanks for the feedback I will take a look and see if I need to update the seed data file or if there is actually a bug on import.

In this case, just like you mentioned you can add the images manually, just not the ideal way, since that should be done using the import feature.

@spaceo but yeah the yarn strapi import should of added all those files.

PaulBratslavsky commented 1 year ago

@spaceo @cjsewell update: I was able to replicate on import not getting all the image relationships set.

https://github.com/strapi/nextjs-corporate-starter/assets/6153188/6dcca2f1-a4b6-4ede-930c-b990b035ba89

There is a DTS issue that should be fixed in the next release on Wednesday 4.10.7 you can see the PR here

PaulBratslavsky commented 1 year ago

UPDATE: I confirmed that there were breaking changes in 4.10.5 so I will revert the main project to 4.10.4 where Import works as expected util the release of 4.10.7

karuna001 commented 1 year ago

Command failed with exit code 1. how to solve this error?

karuna001 commented 1 year ago

how to solve this issue bro?

KennyAtCodin commented 1 year ago

@karuna001: probably an issue with the tokens, did you set the NEXT_PUBLIC_STRAPI_FORM_SUBMISSION_TOKEN and the NEXT_PUBLIC_STRAPI_API_TOKEN?

PaulBratslavsky commented 1 year ago

@karuna001 I will make a video outlining the setup process for the Strapi Starter hopefully that will help. I had no issues setting up the project when I tested it recently.