Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable start project: Cannot find module '@svgr/webpack' #13734

Open
yhojann-cl opened this issue Dec 24, 2024 · 0 comments
Open

Unable start project: Cannot find module '@svgr/webpack' #13734

yhojann-cl opened this issue Dec 24, 2024 · 0 comments

Comments

@yhojann-cl
Copy link

yhojann-cl commented Dec 24, 2024

I try create a new project using npx create-react-app but is broken, i try reutilize a old project created 1 month ago and i delete the node_modules folder and package-lock.json, and execute npm install, its works fine but when try run the project says an error:

$ npm start

> [email protected] start
> react-scripts start

Cannot find module '@svgr/webpack'
Require stack:
- /home/.../webapp/node_modules/react-scripts/config/webpack.config.js
- /home/.../webapp/node_modules/react-scripts/scripts/start.js

I try install mannualy the package using npm install @svgr/webpack but does not work. The package.json file content is:

{
  "name": "web-app",
  "version": "0.1.0-beta",
  "description": "WEB App",
  "homepage": "./",
  "dependencies": {
    "@svgr/webpack": "^8.1.0",
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "bootstrap": "^5.3.3",
    "bootstrap-icons": "^1.11.3",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-markdown": "^9.0.1",
    "react-scripts": "5.0.1",
    "url": "^0.11.3",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Can not create a new project and can not run any project.

My software version:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.1 LTS
Release:	24.04
Codename:	noble

$ node --version
v22.12.0

$ npm --version
10.9.0

I try use node 18 and 22 but does not work.

@yhojann-cl yhojann-cl changed the title Unable start project Unable start project: Cannot find module '@svgr/webpack' Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant