2

I'm trying to run the new Strapi version 4 application. But it returns this error. Is there any bug in new strapi v4? or I'm doing wrong anything? I'm using strapi official guide to start a new project

installation command npx create-strapi-app@latest molla-admin.

NodeJS v16

Windows 11

Error

ModuleNotFoundError: Module not found: Error: Can't resolve '@strapi/design-system/themes' in 'C:\Users\Admin\Desktop\molla-admin\.cache\admin\src'
    at C:\Users\Admin\Desktop\molla-<anonymous>:10:1)
    

You might be thinking @strapi/design-system package is missing right? After that, I also tried to install both @strapi/design-system and @strapi/design-system/themes npm package Still, it doesn't work. It returns a new error

ModuleNotFoundError: Module not found: Error: Can't resolve '@strapi/icons/CarretDown' in 'C:\Users\Admin\Documents\testing\strapi-v4-app\node_modules\@strapi\helper-plugin\build'

Should I go on for the next missing Module?

1
  • can I see your package.json ? Commented Apr 17 at 6:41

8 Answers 8

8

For me the issue was solved by installing @strapi/design-system (Node: v14.15.5, npm: 8.1.3)

npm install @strapi/design-system
Sign up to request clarification or add additional context in comments.

1 Comment

Still, it doesn't work. It returns a new error. I updated my question you can see the error.
5
Node version : 14.18.1
Npm version : 6.14.15
OS : Ubuntu 20.04.3 LTS

Steps I followed:

(I read somewhere that the latest version of node isnt working and someone mentioned using the 14.18.1 version)

  1. Downgraded NPM to use the 14.18.1 version and not the latest.
  2. npm run build on the strapi project. This gave an error that its missing @strapi/design-system.
  3. npm install @strapi/design-system, you get another error that its missing @strapi/icons
  4. npm install @strapi/icons . After this step there was an error relating to JSX scritps something to do with reactjs. So, in the next step , I updated Reactjs
  5. npm install --save react@latest
  6. npm run build again and this time SUCCESS!!

The strapi team should mention the issues on their homepage rather that making new users go through hoops to get it working. They need to make it clear that you can run into issues when using certain version of Node etc. As someone mentioned that they are aware of the issue yet no information in the homepage where new users visit to try it out. It should've been placed as a BANNER at the top in BOLD TEXT.

Comments

1

It's a known bug and they are working on a fix. You have to use yarn in the mean time.

Comments

1

I got this error because I was using Node v16. There was a message somewhere in my troubleshooting that you have to use A Node version >=10.X.X.X and <=14.X.X.X I used NVM(Node Version Manager) to switch to 14.17.6 and it works

1 Comment

Thanks for your information. I also tried with node V14. The error is still the same.
1

I can confirm that this bug is related to using Node v16. To get around the bug, I first ran:

nvm use 14.18.1

Afterwards, running the following resulted in successful compilation:

npm run build -- --clean

No need to attempt installation of @strapi/design-system.

Comments

1

following solution worked for me:

yarn add @strapi/design-system
yarn add @strapi/icons

work on windows and ubuntu

node v14.15.0

yarn 1.22.17

npm 6.14.8

Comments

1

npm install @strapi/design-system

solution worked for me.

node 16.13.1

npm 8.1.4

macOS 12.0.1 on M1Max

Comments

1

Try this way

use node v20.13.0 (npm v10.5.2)

nvm use 20.13.0

in your package json try these versions in "dependencies"

"@strapi/design-system": "1.19.0",
"@strapi/icons": "1.19.0",

amend your package json "engines"

  "engines": {
    "node": ">=14.19.1 <=20.x.x"
  },

Try these and let me know if anything goes wrong

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.