GithubHelp home page GithubHelp logo

strapi / nextjs-corporate-starter Goto Github PK

View Code? Open in Web Editor NEW
883.0 16.0 265.0 136.45 MB

Strapi Demo application for Corporate Websites using Next.js

License: MIT License

JavaScript 11.41% TypeScript 83.55% CSS 3.03% HTML 2.02%

nextjs-corporate-starter's Introduction

Strapi Starter Next 13, Tailwind, Typescript and Strapi

note: This project was started with love by Trecia, Daniel and Paul. We were all new to Next 13 and Typescript. If you find any bugs or improvements feel free to create an issue. Thank you all for your support and participation.

demo-site

Hello Strapi

Strapi Community Edition is a free and open-source headless CMS enabling you to manage any content, anywhere.

  • Self-hosted or Cloud: You can host and scale Strapi projects the way you want. You can save time by deploying to Strapi Cloud or deploy to the hosting platform you want**: AWS, Azure, Google Cloud, DigitalOcean.
  • Modern Admin Pane: Elegant, entirely customizable and a fully extensible admin panel.
  • Multi-database support: You can choose the database you prefer: PostgreSQL, MySQL, MariaDB, and SQLite.
  • Customizable: You can quickly build your logic by fully customizing APIs, routes, or plugins to fit your needs perfectly.
  • Blazing Fast and Robust: Built on top of Node.js and TypeScript, Strapi delivers reliable and solid performance.
  • Front-end Agnostic: Use any front-end framework (React, Next.js, Vue, Angular, etc.), mobile apps or even IoT.
  • Secure by default: Reusable policies, CORS, CSP, P3P, Xframe, XSS, and more.
  • Powerful CLI: Scaffold projects and APIs on the fly.

Features

  • Content Types Builder: Build the most flexible publishing experience for your content managers, by giving them the freedom to create any page on the go with fields, components and Dynamic Zones.
  • Media Library: Upload your images, videos, audio or documents to the media library. Easily find the right asset, edit and reuse it.
  • Internationalization: The Internationalization (i18n) plugin allows Strapi users to create, manage and distribute localized content in different languages, called "locales
  • Role Based Access Control: Create an unlimited number of custom roles and permissions for admin and end users.
  • GraphQL or REST: Consume the API using REST or GraphQL

You can unlock additional features such as SSO, Audit Logs, Review Workflows in Strapi Cloud or Strapi Enterprise.

Getting Started

If you prefer videos that guide you through the setup process you can find them here

  1. Clone the repository locally:
  git clone https://github.com/strapi/nextjs-corporate-starter.git
    or
  gh repo clone strapi/nextjs-corporate-starter
  1. Run setup command to setup frontend and backend dependencies:
  yarn setup
  1. Next, navigate to your /backend directory and set up your .env file. You can use the .env.example file as reference:
HOST=localhost
PORT=1337
APP_KEYS="toBeModified1,toBeModified2"
API_TOKEN_SALT=tobemodified
ADMIN_JWT_SECRET=tobemodified
JWT_SECRET=tobemodified
TRANSFER_TOKEN_SALT=tobemodified
  1. Start your project by running the following command:
  yarn build
  yarn develop

You will be prompted to create your first admin user.

admin-user

Great. You now have your project running. Let's add some data.

Seeding The Data

We are going to use our DEITS feature which will alow to easily import data into your project.

You can learn more about it in our documentation here.

In the root of our project we have our seed-data.tar.gz file. We will use it to seed our data.

  1. Open up your terminal and make sure you are still in you backend folder.

  2. Run the following command to seed your data:

  yarn strapi import -f ../seed-data.tar.gz

after-import

This will import your data locally. Log back into your admin panel to see the newly imported data.

Here is a quick video covering initial setup and data seeding.

seed-data-demo.mp4

Setting Up The Frontend

Next we need to switch to our /frontend directory and create our .env file and paste in the following.

NEXT_PUBLIC_STRAPI_API_TOKEN=your-api-token
NEXT_PUBLIC_PAGE_LIMIT=6
NEXT_PUBLIC_STRAPI_FORM_SUBMISSION_TOKEN=your-form-submission-token
NEXT_PUBLIC_STRAPI_API_URL=http://localhost:1337

Before starting our Next JS app we need to go inside our Strapi Admin and create two tokens that we will be using for form submission and displaying our content.

Inside your Strapi Admin Panel navigate to Settings -> API Tokens and click on the Create new API Token.

api-tokens

Here are our Token Settings

Name: Public API Token Content Description: Access to public content. Token duration: Unlimited Token type: Custom

In Permissions lets give the following access.

Content Permissions
Article find and findOne
Author find and findOne
Category find and findOne
Global find
Page find and findOne
Product-feature find and findOne

permissions

Once you have your token add it to your NEXT_PUBLIC_STRAPI_API_TOKEN variable name in the .env file.

Alternatively: you can create a READ only Token that will give READ permission to all your endpoints.

In this particular project this is not an issue. Although the above is the recommended way, just wanted to show you this option here as well.

When creating a Token, just select the Read-only option from token type drop down.

create-read-only-token

Next create a token that will allow us to submit our form.

Name: Public API Form Submit Description: Form Submission. Token duration: Unlimited Token type: Custom

In Permissions lets give the following access.

Content Permissions
Lead-Form-Submission create

Add your token to your NEXT_PUBLIC_STRAPI_FORM_SUBMISSION_TOKEN variable name in the .env file.

Once your environment variables are set you can start your frontend application by running yarn dev.

You should now see your Next JS frontend.

frontend

Start Both Projects Concurrently

We can also start both projects with one command using the concurrently package.

You can find the setting inside the package.json file inside the root folder.

{
  "scripts": {
    "frontend": "yarn dev --prefix ../frontend/",
    "backend": "yarn dev --prefix ../backend/",
    "clear": "cd frontend && rm -rf .next && rm -rf cache",
    "setup:frontend": "cd frontend && yarn",
    "setup:backend": "cd backend && yarn",
    "setup": "yarn install && yarn setup:frontend && yarn setup:backend",
    "dev": "yarn clear && concurrently \"cd frontend && yarn dev\" \"cd backend && yarn develop\""
  },
  "dependencies": {
    "concurrently": "^7.6.0"
  }
}

Go to the root folder and install the package, yarn You can start both apps by running yarn dev.

Conclusion

Hope you find this starter useful, it is a bare-bone example to help you get started quickly.

Would love to hear what you will build using it.

If you find bugs or have suggestions feel free to create issues.

Thank you and stay awesome.

Contributing to the Next.js Corporate Starter repository

We're so excited that you're thinking about contributing to the Next.js Corporate Starter open-source project! If you're unsure or afraid of anything, just know that you can't mess up here. Any contribution is valuable, and we appreciate you!

This document aims to provide all the necessary information for you to make a contribution.

Prerequisites

Before you can contribute, you need to have the following installed:

  • Node.js and npm: You can download these from the official Node.js website.
  • Git: You can find installation instructions for Git in the official Git Book.

Steps to Contribute

1. Fork the Repository

In your web browser, navigate to https://github.com/strapi/nextjs-corporate-starter. Click the 'Fork' button in the upper right-hand corner of the page. This creates a copy of the repository in your GitHub account.

2. Clone your Fork

Now, go to your version of the repository. You can do this by navigating to https://github.com/USERNAME/nextjs-corporate-starter (replace 'USERNAME' with your GitHub username). Here, click the 'Clone' button and then 'Copy to clipboard' to copy the git URL.

Next, you need to open your terminal, navigate to where you want to store the project, and type the following command, followed by 'Enter':

git clone PASTE_CLONED_REPOSITORY_URL

Replace 'PASTE_CLONED_REPOSITORY_URL' with the URL you copied earlier. This command downloads your fork to your computer.

3. Add Upstream Repository

Before you can start contributing, you have to set up a reference to the original repository. You can do this with the following command:

git remote add upstream https://github.com/strapi/nextjs-corporate-starter.git

This command adds a new remote, named 'upstream', that points to the original repository.

4. Synchronize your Fork

Before you start making changes, you should synchronize your forked repository with the latest changes from the upstream. Here are the steps:

a. Fetch the branches and their respective commits:

git fetch upstream

b. Checkout to the main branch of your fork:

git checkout main

c. Merge changes from the upstream's main branch into your local main branch:

git merge upstream/main

This brings your fork's main branch into sync with the upstream repository, without losing your local changes.

5. Create a Branch

When you're making a contribution, it's best to make your changes in a new branch instead of the main branch. You can create a new branch and switch to it using the following command:

git checkout -b BRANCH_NAME

Replace 'BRANCH_NAME' with a name that describes the change you're planning to make.

6. Make your Changes

Now, you can start making changes to the project. Feel free to make changes that you think will enhance the project.

7. Commit your Changes

When you've made your changes, you need to commit them. This is like creating a save point in a game. You can do this using the following commands:

git add -A
git commit -m "Your detailed commit message"

Replace "Your detailed commit message" with a description of the changes you made.

8. Push your Changes

After committing your changes, you need to push them to your forked repository on GitHub. You can do this with the following command:

git push origin BRANCH_NAME

Replace 'BRANCH_NAME' with the name of the branch you created earlier.

9. Create a Pull Request

After you've pushed your changes, you're ready to create a pull request (PR). Navigate to your forked repository in your web browser and click on 'Pull request' (near the top of the page), then on 'New pull request'. Ensure that the base fork is the original repository and the base is 'main', and that the head fork is your fork and the compare is the branch you created.

Enter a title for your PR and describe the changes you made. Once you're ready, click 'Create pull request'.

Congrats! ๐ŸŽ‰

You've just made a contribution to the Next.js Corporate Starter project! The team will review your changes and may suggest some modifications or improvements. Once your changes have been approved, they will be merged into the main codebase.

Thank you for your contribution. We appreciate you!

Remember, everyone was new to open-source at some point. If you're unsure about something, don't hesitate to ask for help. Good luck and happy hacking!

Psst...

If you find yourself contributing frequently, we've provided a script in the package.json to help keep your local project synchronized with the main branch of the upstream (original) project. Simply execute the following command:

yarn repo:upstream

FAQ

How do I add additional pages?

Check out this video where I will guide on how to do this.

How do I update my Strapi version?

Check out this this issue comment

nextjs-corporate-starter's People

Contributors

amaubu avatar anasgamal avatar andregomars avatar derrickmehaffy avatar diramazioni avatar ferhatelmas avatar kennyatcodin avatar kstulgys avatar luberlu avatar martijnpor avatar mnzaki avatar noahemmenegger avatar orivelton avatar paulbratslavsky avatar pravishanth avatar primetimetran avatar spaceo avatar thisismyname678 avatar treciaks avatar treckstar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nextjs-corporate-starter's Issues

Navbar and Footer not displaying localized content from Strapi CMS in Next.js

Bug Description:
Next.js Navbar and Footer components do not display localized content that should be fetched from Strapi CMS,. Despite creating localized versions in different languages and adding language-specific content to the header and footer sections in the Strapi CMS, the website only shows the default (i suppose) locale content for the Navbar and Footer across all languages.

Steps to Reproduce:

  1. Go to the Content Manager in Strapi CMS.
  2. Select Global under Single Type.
  3. Create a localized version in another language.
  4. Add language-specific content to the header and footer or any other sections.
  5. Save the changes.
  6. View the website in the selected language.

Expected Result:
All homepage sections, including the Navbar and Footer, should display the localized content specific to the selected language.

Actual Result:
The Navbar and Footer components continue to display the default locale content across all languages, instead of the expected localized content.

.env cant make develop

image
i am a rookie
I dont know where get the app_keys and tokens...
so i use example the 1337 developed but i cant visit it
after few hours finaly find the problem is .env
so i use the .env from when i first use yarn create strapi-app my-project --quickstart to build a strapi pro
finally it work

HOST=0.0.0.0
PORT=1337
APP_KEYS=tzxxA==
API_TOKEN_SALT=VreRxx==
ADMIN_JWT_SECRET=Yi9xx==
TRANSFER_TOKEN_SALT=+Zx8xx==

Database

DATABASE_CLIENT=sqlite
DATABASE_FILENAME=.tmp/data.db
JWT_SECRET=QPNxx==

but i find host is diffrent from example ! its 0.0.0.0 so i change to localhost then i cant visit ๐Ÿ˜ญ
maybe problem is iam useing ssh connect to linux server and use docker to develop idk ๐Ÿ˜ตโ€๐Ÿ’ซ
but ty PaulBratslavsky , i see you video in youtobe,its very helpful , i rember you prefer remix so why here is next XD

seed data has error

While I am importing the yarn strapi import -f ../seed-data.tar.gz or yarn strapi import -f ../fixed-data.tar.gz

it shows this error:

[2023-04-20 09:33:12.880] error: [FATAL] Invalid schema changes detected during integrity checks (using the strict strategy). Please find a summary of the changes below:
- admin::permission:
  -  exists in destination schema but not in source schema
- admin::user:
  -  exists in destination schema but not in source schema
- admin::role:
  -  exists in destination schema but not in source schema
- admin::api-token:
  -  exists in destination schema but not in source schema
- admin::api-token-permission:
  -  exists in destination schema but not in source schema
- admin::transfer-token:
  -  exists in destination schema but not in source schema
- admin::transfer-token-permission:
  -  exists in destination schema but not in source schema
- plugin::upload.file:
  -  exists in destination schema but not in source schema
- plugin::upload.folder:
  -  exists in destination schema but not in source schema
- plugin::i18n.locale:
  -  exists in destination schema but not in source schema
- plugin::users-permissions.permission:
  -  exists in destination schema but not in source schema
- plugin::users-permissions.role:
  -  exists in destination schema but not in source schema
- plugin::users-permissions.user:
  -  exists in destination schema but not in source schema
- api::article.article:
  -  exists in destination schema but not in source schema
- api::author.author:
  -  exists in destination schema but not in source schema
- api::category.category:
  -  exists in destination schema but not in source schema
- api::global.global:
  -  exists in destination schema but not in source schema
- api::lead-form-submission.lead-form-submission:
  -  exists in destination schema but not in source schema
- api::page.page:
  -  exists in destination schema but not in source schema
- api::product-feature.product-feature:
  -  exists in destination schema but not in source schema
- elements.feature-column:
  -  exists in destination schema but not in source schema
- elements.feature-row:
  -  exists in destination schema but not in source schema
- elements.feature:
  -  exists in destination schema but not in source schema
- elements.footer-section:
  -  exists in destination schema but not in source schema
- elements.logos:
  -  exists in destination schema but not in source schema
- elements.notification-banner:
  -  exists in destination schema but not in source schema
- elements.plan:
  -  exists in destination schema but not in source schema
- elements.testimonial:
  -  exists in destination schema but not in source schema
- layout.footer:
  -  exists in destination schema but not in source schema
- layout.logo:
  -  exists in destination schema but not in source schema
- layout.navbar:
  -  exists in destination schema but not in source schema
- links.button-link:
  -  exists in destination schema but not in source schema
- links.button:
  -  exists in destination schema but not in source schema
- links.link:
  -  exists in destination schema but not in source schema
- links.social-link:
  -  exists in destination schema but not in source schema
- meta.metadata:
  -  exists in destination schema but not in source schema
- sections.bottom-actions:
  -  exists in destination schema but not in source schema
- sections.feature-columns-group:
  -  exists in destination schema but not in source schema
- sections.feature-rows-group:
  -  exists in destination schema but not in source schema
- sections.features:
  -  exists in destination schema but not in source schema
- sections.heading:
  -  exists in destination schema but not in source schema
- sections.hero:
  -  exists in destination schema but not in source schema
- sections.large-video:
  -  exists in destination schema but not in source schema
- sections.lead-form:
  -  exists in destination schema but not in source schema
- sections.pricing:
  -  exists in destination schema but not in source schema
- sections.rich-text:
  -  exists in destination schema but not in source schema
- sections.testimonials-group:
  -  exists in destination schema but not in source schema
- shared.media:
  -  exists in destination schema but not in source schema
- shared.quote:
  -  exists in destination schema but not in source schema
- shared.rich-text:
  -  exists in destination schema but not in source schema
- shared.seo:
  -  exists in destination schema but not in source schema
- shared.slider:
  -  exists in destination schema but not in source schema
- shared.video-embed:
  -  exists in destination schema but not in source schema
Import process failed.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Problem with Video/Image fetching data

Code from starter repo.
Seeding was successful.

Problem when I type all neccesary fields in content manager and submit all changes
In sections components :

  • Large video
  • Slider

When I added the blocks for the article namely the slider it does not return the image data

  {
    id: 2,
    __component: 'shared.video-embed',
    url: 'https://youtu.be/rfSWR3L21zc?si=yrhpM2j1_C-Tk9Va'
  },
  { id: 1, __component: 'shared.slider' }
]

โจฏ src/app/[lang]/components/ImageSlider.tsx (26:20) @ data
 โจฏ TypeError: Cannot read properties of undefined (reading 'data')
    at Slideshow (./src/app/[lang]/components/ImageSlider.tsx:19:34)
  24 |     <div className="slide-container">
  25 |       <Fade>
> 26 |         {data.files.data.map((fadeImage: Image, index) => {
     |                    ^
  27 |           const imageUrl = getStrapiMedia(fadeImage.attributes.url);
  28 |           return (
  29 |             <div key={index}>

also same on pages with Large video component.

How to fix this?

Negotiator prevents googlebot from indexing the page

When in production, I noticed that Googlebot constantly reported a 5xx error when trying to check the page for indexing. I used a URL-checking tool for this. Interestingly, I noticed that the reason for this is that the negotiator library produces an incorrect list of languages, and passes it to the intl-localematcher, which in turn throws an error described here formatjs/formatjs#2440. The temporary fix I introduced was to fix the value of languages to just an empty list. However, negotiator itself hasn't been updated in several years already, so I think it should be replaced with smth else.

Add CKEditor

Could you add a CKEditor similar to the FoodAdvisor demo.

Frontend cannot load

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

image

node version problem

i got this error when i run "yarn setup" for one of the module

if i use "--ignore-engines" it is okay but this time gives error for backend build

The engine "node" is incompatible with this module. Expected version ">=14.19.1 <=18.x.x". Got "20.4.0".

Add preview mode

Would be interesting to have a preview/draft mode included in this starter as well.

UP NEXT: Will be reviewing outstanding PRs this weekend Oct 28th

This is a current list of the items that I am focusing on doing first. Feel free to contribute if you like but it is not mandatory.

  • Data fetching not working when in a locale that is not handled, should default to English #8
  • PR Review
  • Add SEO to Blog pages: #32
  • Create a deployment guide for Vercel and Strapi Cloud #22
  • Add mobile menu #47
  • Data Import not linking all media waiting for 4.10.7 this was fixed with 4.12.1 release
  • Add preview mode #18 ( Backlog )
  • Go through open pr request ( up next )

Confusing documentation of .env.example

In the README.md file it says that you can copy the .env.example to create your own .envfile.
But there is no such example file in the root of the project.

image

UPDATE:
After some digging I found it lying in the backend directory. I think the documentation should be clearer about that.

Import does not work

` [2023-05-22 16:51:33.069] error: [FATAL] Invalid schema changes detected during integrity checks (using the strict strategy). Please find a summary of the changes below:

  • admin::permission:
    • exists in destination schema but not in source schema
  • admin::user:
    • exists in destination schema but not in source schema
  • admin::role:
    • exists in destination schema but not in source schema
  • admin::api-token:
    • exists in destination schema but not in source schema
  • admin::api-token-permission:
    • exists in destination schema but not in source schema
  • admin::transfer-token:
    • exists in destination schema but not in source schema
  • admin::transfer-token-permission:
    • exists in destination schema but not in source schema
  • plugin::upload.file:
    • exists in destination schema but not in source schema
  • plugin::upload.folder:
    • exists in destination schema but not in source schema
  • plugin::i18n.locale:
    • exists in destination schema but not in source schema
  • plugin::users-permissions.permission:
    • exists in destination schema but not in source schema
  • plugin::users-permissions.role:
    • exists in destination schema but not in source schema
  • plugin::users-permissions.user:
    • exists in destination schema but not in source schema
  • api::article.article:
    • exists in destination schema but not in source schema
  • api::author.author:
    • exists in destination schema but not in source schema
  • api::category.category:
    • exists in destination schema but not in source schema
  • api::global.global:
    • exists in destination schema but not in source schema
  • api::lead-form-submission.lead-form-submission:
    • exists in destination schema but not in source schema
  • api::page.page:
    • exists in destination schema but not in source schema
  • api::product-feature.product-feature:
    • exists in destination schema but not in source schema
  • elements.feature-column:
    • exists in destination schema but not in source schema
  • elements.feature-row:
    • exists in destination schema but not in source schema
  • elements.feature:
    • exists in destination schema but not in source schema
  • elements.footer-section:
    • exists in destination schema but not in source schema
  • elements.logos:
    • exists in destination schema but not in source schema
  • elements.notification-banner:
    • exists in destination schema but not in source schema
  • elements.plan:
    • exists in destination schema but not in source schema
  • elements.testimonial:
    • exists in destination schema but not in source schema
  • layout.footer:
    • exists in destination schema but not in source schema
  • layout.logo:
    • exists in destination schema but not in source schema
  • layout.navbar:
    • exists in destination schema but not in source schema
  • links.button-link:
    • exists in destination schema but not in source schema
  • links.button:
    • exists in destination schema but not in source schema
  • links.link:
    • exists in destination schema but not in source schema
  • links.social-link:
    • exists in destination schema but not in source schema
  • meta.metadata:
    • exists in destination schema but not in source schema
  • sections.bottom-actions:
    • exists in destination schema but not in source schema
  • sections.feature-columns-group:
    • exists in destination schema but not in source schema
  • sections.feature-rows-group:
    • exists in destination schema but not in source schema
  • sections.features:
    • exists in destination schema but not in source schema
  • sections.heading:
    • exists in destination schema but not in source schema
  • sections.hero:
    • exists in destination schema but not in source schema
  • sections.large-video:
    • exists in destination schema but not in source schema
  • sections.lead-form:
    • exists in destination schema but not in source schema
  • sections.pricing:
    • exists in destination schema but not in source schema
  • sections.rich-text:
    • exists in destination schema but not in source schema
  • sections.testimonials-group:
    • exists in destination schema but not in source schema
  • shared.media:
    • exists in destination schema but not in source schema
  • shared.quote:
    • exists in destination schema but not in source schema
  • shared.rich-text:
    • exists in destination schema but not in source schema
  • shared.seo:
    • exists in destination schema but not in source schema
  • shared.slider:
    • exists in destination schema but not in source schema
  • shared.video-embed:
    • exists in destination schema but not in source schema
      Import process failed.
      error Command failed with exit code 1. `

Thank you all for your help and contribution.

This is a community build project with love, when we built it with Trecia and Daniel we were still learning Next 13 ( Beta Features ) and TypeScript. If you find any bugs our issues, let us know or feel free to create a PR.

note: community contribution tag is used to identify items where we are looking for community contribution.

The goal of this project is to create an "easy to start" Strapi and Next JS example which you can use to get started quickly and build upon.

If you are looking for more in depth Strapi Project example checkout our Food Advisor

robots.txt file for SEO

I tried adding the files-based configuration for SEO. I added the robots.txt file inside the app directory but cannot find it. I experimented by keeping it inside the [lang] directory also. Anybody with solutions?

better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 93. This version of Node.js requires NODE_MODULE_VERSION 108.

I got this error while importing data:

yarn strapi import -f ../seed-data.tar.gz
yarn run v1.22.19
warning ../../../../../package.json: No license field
$ strapi import -f ../seed-data.tar.gz
? The import will delete all assets and data in your database. Are you sure you want to proceed? Yes
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: The module '/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 108. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Module._load (node:internal/modules/cjs/loader:827:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at bindings (/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/bindings/bindings.js:112:48)
at new Database (/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/better-sqlite3/lib/database.js:48:64)
at Client_BetterSQLite3.acquireRawConnection (/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/knex/lib/dialects/better-sqlite3/index.js:12:12)
at create (/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/knex/lib/client.js:254:39)
Error: The module '/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 108. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Module._load (node:internal/modules/cjs/loader:827:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at bindings (/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/bindings/bindings.js:112:48)
at new Database (/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/better-sqlite3/lib/database.js:48:64)
at Client_BetterSQLite3.acquireRawConnection (/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/knex/lib/dialects/better-sqlite3/index.js:12:12)
at create (/home/thanhson/Downloads/tmp/strapi/nextjs-corporate-starter/backend/node_modules/knex/lib/client.js:254:39) {
code: 'ERR_DLOPEN_FAILED'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

UPDATE: Will be going over PR soon had to...

Thank you all for your patients. I will be going over the PR soon.

Was waiting for the 4.12.1 release to add the security updates and import/export fix that prevented be from updating.

I recently just made the update #68

Error during install dependencies.

Screenshot from 2023-04-27 10-41-25

As you can see in the image above, the error comes from better-sqlite package.
This repo uses [email protected]. and it seems that it is not working with v18.x.x of the node.js.

I upgraded the version of better-sqlite as a latest one. and then it works.

My node.js version is 18.12.1.

SVG media are 404

If I build for production uploaded SVG are not found anymore and points to different urls:
ie regular uploaded images:
<img srcset="/_next/image?url=http%3A%2F%2Flocalhost%3A1337%2Fuploads%2Fdiram_logo_2_ef0f07c073.png&amp;w=640&amp;q=75 1x, /_next/image?url=http%3A%2F%2Flocalhost%3A1337%2Fuploads%2Fdiram_logo_2_ef0f07c073.png&amp;w=828&amp;q=75 2x" src="/_next/image?url=http%3A%2F%2Flocalhost%3A1337%2Fuploads%2Fdiram_logo_2_ef0f07c073.png&amp;w=828&amp;q=75">
svg files:
<img src="http://localhost:1337/uploads/eli_web_b0f6db5a4c.svg" >

(Omiitted other tags for brevity)
In dev works because localhost is localhost I guess

next/image does work with SVG if I hardcore the import in /public.

What can I do? This problem really caught me with the website already online...

Thanks and fetchAPI options

Hi everyone, just spent the week-end discovering and tweaking the project, learned so much, it's a wonderfull project !
Since a few weeks I was working on creating a Strapi & Nuxt boilerplate with Typescript and recently decided to move to Next.js instead, I feel bless that such a good boilerplate exists !
I'd love to participate to the project when I'll be sure to have explored fully the project. Do you have a discord or something to chat about it ?

Despite my actual research I already have a question : what is the options params in fetchAPI for ? It's always used to add the bearer token to the request , why not including it inside fetchAPI function ?

Finally if some of you are willing to share some public repo where this boilerplate has been used I'd be really curious about it!

404 for other slugs/pages than home and blog

I created a new page (about) in strapi and tried to navigate to it. Unfortunately, the frontend seems not to handle this route, as a 404 page could not be found is rendered.

This only renders the home page

export default async function RootRoute({ params }: { params: { lang: string } }) { const page = await getPageBySlug('home', params.lang); if (page.data.length === 0) return null; const contentSections = page.data[0].attributes.contentSections; return contentSections.map((section: any, index: number) => sectionRenderer(section, index)); }

Seeding data run successful but Collection types are not imported

Hi, I used this starter in my monorepo, managed to get the Strapi up and running, but when I run the import script:

pnpm --filter backend run strapi import -f seed-data.tar.gz

I got lot of error with Schema Integrity:

Screenshot 2023-08-22 at 12 26 24

then when I check, the Collection types are not show up as the example, e.g. empty.
Screenshot 2023-08-22 at 12 27 06

I wonder what I miss here

Opengraph image has incorrect URL when using dynamic route

Summary

I'm trying to dynamically generate opengraph image, and I placed opengraph-image.tsx in /src/app/[lang] directory. I used the following code

import { ImageResponse } from "next/server";
import { getGlobal } from "./utils/get-globals";
import { getStrapiMedia } from "./utils/api-helpers";
import { Picture } from "./utils/models";

export const contentType = "image/png"

export default async function Image({ params }: { params: { lang: string } }) {
    const meta = await getGlobal(params.lang);
    const shareImage: Picture = meta.data.attributes.metadata.shareImage
    const imgUrl = getStrapiMedia(shareImage.data.attributes.url);

    return new ImageResponse(
        (
            <div tw="relative flex w-full h-full items-center justify-center">
                {/* Background */}
                <div tw="absolute flex inset-0">
                    <img
                        tw="flex flex-1"
                        src={imgUrl || ""}
                        alt={shareImage.data.attributes.alternativeText}
                    />
                </div>
            </div>
        ),
        {
            width: shareImage.data.attributes.width,
            height: shareImage.data.attributes.height
        }
    )
}

The meta tag is generated as

<meta property="og:image" content="http://localhost:3000/[lang]/opengraph-image/?c5620f0c68b1d1fa"/>

and the preview is not visible neither in the browser nor in messaging apps. When I type the above link in my browser as is, the image is not found, but when I replace the [lang] part with a specific language like en it works just fine. How can I fix it? Another question: can I make just one OG image for the entire app or do I have to create this file in every single directory with page.tsx?

first step, yarn setup , errors pop up

yarn run v1.22.19
$ yarn install && yarn setup:frontend && yarn setup:backend
[1/4] ๐Ÿ” Resolving packages...
[2/4] ๐Ÿšš Fetching packages...
[3/4] ๐Ÿ”— Linking dependencies...
[4/4] ๐Ÿ”จ Building fresh packages...

$ cd frontend && yarn
[1/4] ๐Ÿ” Resolving packages...
[2/4] ๐Ÿšš Fetching packages...
[3/4] ๐Ÿ”— Linking dependencies...
[4/4] ๐Ÿ”จ Building fresh packages...
$ cd backend && yarn
[1/5] ๐Ÿ” Validating package.json...
[2/5] ๐Ÿ” Resolving packages...
[3/5] ๐Ÿšš Fetching packages...
[4/5] ๐Ÿ”— Linking dependencies...
warning " > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning " > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning " > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning " > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-router-dom@^5.2.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "styled-components@^5.2.1".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-router-dom@^5.3.4".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "styled-components@^5.3.3".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > [email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-i18n > [email protected]" has unmet peer dependency "react@^16.6.0 || 17 || 18".
warning "@strapi/plugin-i18n > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > [email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @floating-ui/[email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @floating-ui/[email protected]" has unmet peer dependency "react-dom@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@babel/runtime@>=7.11.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/state@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/theme-one-dark@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/view@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "codemirror@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "react-dom@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/design-system > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > [email protected]" has unmet peer dependency "react@>=16.3.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > [email protected]" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > react-redux > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/autocomplete@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/language@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/lint@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/search@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/view@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > react-remove-scroll > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > react-remove-scroll > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > react-remove-scroll > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > react-remove-scroll > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-helmet > [email protected]" has unmet peer dependency "react@^16.3.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > @emotion/[email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > [email protected]" has unmet peer dependency "react@>=16.6.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > [email protected]" has unmet peer dependency "react-dom@>=16.6.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/react-popper > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/react-popper > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/react-popper > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/react-popper > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/codemirror-extensions-basic-setup > @codemirror/[email protected]" has unmet peer dependency "@lezer/common@^1.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > @emotion/react > @emotion/[email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-seo > [email protected]" has unmet peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0".
warning " > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning " > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning " > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning " > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has incorrect peer dependency "@strapi/[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/admin > styled-components > babel-plugin-styled-components > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
[5/5] ๐Ÿ”จ Building fresh packages...
[-/5] โก€ waiting...
[-/5] โก€ waiting...
[3/5] โก€ sharp
[-/5] โก€ waiting...
error /Users/spacecymatics/Desktop/nextjs-corporate-starter/backend/node_modules/better-sqlite3: Command failed.
Exit code: 127
Command: prebuild-install || node-gyp rebuild --release
Arguments:
Directory: /Users/spacecymatics/Desktop/nextjs-corporate-starter/backend/node_modules/better-sqlite3
Output:

error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
image

Responsive image loading with custom image loader for strapi images

Hi there,

first of all thanks for your work in this repo, its a great place to find good practices to make Next.js and Strapi work together!

Regarding image loading I have a suggestion for this starter: afaik Strapi does not support loading images by a width parameter (e.g. "?w=1024") as used in the Next.js docs, but provides different urls for each breakpoint (see example). I implemented a custom image loader for Next.js to get the best fitting image for the current screen size.
I don't know much yet about the Next.js image loader and Strapi. I just want to share my current code to give you the opportunity to implement it in this starter if the implementation makes sense. Maybe there is a much better and easier solution, then I am happy to learn and adapt :)

I created a gist with my current code.

How it works: The component StrapiImage.tsx implements a custom loader. The loader returns the best fitting breakpoint image url according to the current screen size. The breakpoints can either be stored statically or in a json file that can be generated with a script from the Strapi config file.
For the placeholders to work, the Strapi extension strapi-plugin-placeholder must be installed.

Looking forward to hear your feedback!

Redundant code for home page and [...slug]/page

It would be nice if we could handle the "home route" with the same code as all the other pages. The home page should not be treated differently.

What I can think of is redirecting the home page to a slug page. Not sure though if Next.js could handle that. Maybe someone with more knowledge can help on this (if you point me in the right direction, I'm happy to implement it myself)

[ PRs Welcome ] Error when fetching page data

I have followed all needed steps but I get this error.

wait  - compiling...
event - compiled client and server successfully in 375 ms (265 modules)
wait  - compiling /src/middleware (client and server)...
event - compiled successfully in 73 ms (73 modules)
wait  - compiling /[lang]/page (client and server)...
event - compiled client and server successfully in 1303 ms (629 modules)
error - SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
error - SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
error - SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
error - SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
error - SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
error - src\app\[lang]\page.tsx (16:41) @ attributes
error - TypeError: Cannot read properties of undefined (reading 'attributes')
    at RootRoute (./src/app/[lang]/page.tsx:28:42)
  14 | export default async function RootRoute({ params }: { params: { lang: string } }) {
  15 |     const page = await getPageBySlug('home', params.lang);
> 16 |     const contentSections = page.data[0].attributes.contentSections;
     |                                         ^
  17 |
  18 |     return contentSections.map((section: any, index: number) => sectionRenderer(section, index));
  19 | }

If I console log the page variable I get this:

{
  data: [],
  meta: { pagination: { page: 1, pageSize: 25, pageCount: 0, total: 0 } }
}

I noticed that params.lang will get value 'favicon.ico' but when request made with getPageBySlug('home', 'en'); I get correct data

{
  data: [ { id: 1, attributes: [Object] } ],
  meta: { pagination: { page: 1, pageSize: 25, pageCount: 1, total: 1 } }
}

But still there is this and nothing shows up at the browser

wait  - compiling /[lang]/page (client and server)...
event - compiled successfully in 465 ms (276 modules)
error - SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
error - SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
error - SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)

Data seeding didn't work so I filled it manually (page with the home slug and global)

Windows 11

when 'yarn setup' , dependency issues happen

warning " > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning " > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning " > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning " > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-router-dom@^5.2.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "styled-components@^5.2.1".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-router-dom@^5.3.4".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "styled-components@^5.3.3".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > [email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-i18n > [email protected]" has unmet peer dependency "react@^16.6.0 || 17 || 18".
warning "@strapi/plugin-i18n > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > [email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @floating-ui/[email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @floating-ui/[email protected]" has unmet peer dependency "react-dom@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@babel/runtime@>=7.11.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/state@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/theme-one-dark@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/view@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "codemirror@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "react-dom@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/design-system > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > [email protected]" has unmet peer dependency "react@>=16.3.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > [email protected]" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > react-redux > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dismissable-layer > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/autocomplete@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/language@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/lint@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/search@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/view@>=6.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > react-remove-scroll > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > react-remove-scroll > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > react-remove-scroll > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > react-remove-scroll > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-helmet > [email protected]" has unmet peer dependency "react@^16.3.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > @emotion/[email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > [email protected]" has unmet peer dependency "react@>=16.6.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > [email protected]" has unmet peer dependency "react-dom@>=16.6.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @radix-ui/react-dropdown-menu > @radix-ui/react-menu > [email protected]" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/react-popper > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/react-popper > @radix-ui/[email protected]" has unmet peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/react-popper > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @strapi/ui-primitives > @radix-ui/react-popper > @radix-ui/[email protected]" has unmet peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "@strapi/plugin-i18n > @strapi/design-system > @uiw/react-codemirror > @uiw/codemirror-extensions-basic-setup > @codemirror/[email protected]" has unmet peer dependency "@lezer/common@^1.0.0".
warning "@strapi/plugin-i18n > @strapi/helper-plugin > react-select > @emotion/react > @emotion/[email protected]" has unmet peer dependency "react@>=16.8.0".
warning "@strapi/plugin-seo > [email protected]" has unmet peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0".
warning " > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning " > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning " > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning " > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has incorrect peer dependency "@strapi/[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/[email protected]" has unmet peer dependency "[email protected]".
warning "@strapi/strapi > @strapi/admin > styled-components > babel-plugin-styled-components > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
[5/5] ๐Ÿ”จ Building fresh packages...
[-/5] โ „ waiting...
[-/5] โ „ waiting...
[3/5] โ „ sharp
[-/5] โ „ waiting...
error /Users/spacecymatics/Desktop/nextjs-corporate-starter/backend/node_modules/better-sqlite3: Command failed.
Exit code: 127
Command: prebuild-install || node-gyp rebuild --release
Arguments:
Directory: /Users/spacecymatics/Desktop/nextjs-corporate-starter/backend/node_modules/better-sqlite3
Output:

error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Wrong API token name in documentation

In the README.md it says:
Once you have your token add it to your NEXT_STRAPI_API_TOKEN variable name in the .env file.

The name of the token must have changed since it was written. I believe it is now called: NEXT_PUBLIC_STRAPI_API_TOKEN?

How can I upgrade my Strapi version to v4.10.5?

When I directly modify the version in package.json and run npm install again, it throws an error.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @strapi/strapi@undefined
npm ERR! node_modules/@strapi/strapi
npm ERR! @strapi/strapi@"4.10.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @strapi/strapi@"^4.0.0" from @strapi/[email protected]
npm ERR! node_modules/@strapi/plugin-seo
npm ERR! @strapi/plugin-seo@"^1.8.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Fix Metadata/SEO

On the pages and global content type, the SEO plugin should also be used. Also, it seems that the metadata is not loaded correctly for any of the pages, always the global values are used.

@PaulBratslavsky is that correct? I will try to implement this for the dynamic pages which I'm currently developing

VIDEOS: How To Get Started with the Strapi Starter

I made these videos to help guide you on how to get started with the Strapi Starter.

note: I did deploy Strapi to Strapi Cloud but if you are looking for a hobby tear pricing checkout out this guide on Render. https://render.com/docs/deploy-strapi

First and second video cover Strapi starter local setup. Third video covers how to deploy you Strapi backend to Strapi cloud. And final video covers how to deploy your Next JS frontend to Vercel

Setting Up Strapi Starter Project video 1 & 2

https://youtu.be/7F9S1yiqq0c

https://youtu.be/a23JvssqrrQ

Deploying Strapi backend to Strapi Cloud

https://youtu.be/qHqzUdC7xaI

Deploying Next JS frontend to Vercel

https://youtu.be/SkKFHcCACr4

Category Slug Generation Doesn't Reflect Category's Name

Issue:
Currently, when the "generate" button is pressed to create a category slug, it always outputs "category" regardless of the actual category name.

Expected Behavior:
The category slug generation should be based on the category's name. For example, if the category's name is "strapi," the slug should be automatically generated as "strapi" if it's available. If a slug with the same name already exists, it should generate a unique slug like "strapi-1" or similar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.