最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

firebase - npm ci typescript error in my create-react-app - Stack Overflow

programmeradmin2浏览0评论

I am trying to deploy and finish my first ever react webpage project. My code is purely made in js, i dont think i used typesctipt

I've already created front-end using my knowledge and ChatGPT. And I am using .git for version control

My npm install running good, when I started building it, also shows no signs of problem.

npm build serve -s build

when I am trying to deploy my webpage to firebase i am getting an error because firebase uses: npm ci & npm run build for build, and npm ci is throwing this error:

npm ci        
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/typescript
npm error   peer typescript@">= 2.7" from [email protected]
npm error   node_modules/fork-ts-checker-webpack-plugin
npm error     fork-ts-checker-webpack-plugin@"^6.5.0" from [email protected]
npm error     node_modules/react-dev-utils
npm error       react-dev-utils@"^12.0.1" from [email protected]
npm error       node_modules/react-scripts
npm error         react-scripts@"5.0.1" from the root project
npm error   peerOptional typescript@"^5" from [email protected]
npm error   node_modules/i18next
npm error     i18next@"^24.2.1" from the root project
npm error     peer i18next@">= 23.2.3" from [email protected]
npm error     node_modules/react-i18next
npm error       react-i18next@"^15.4.0" from the root project
npm error   1 more (tsutils)
npm error
npm error Could not resolve dependency:
npm error peerOptional typescript@"^3.2.1 || ^4" from [email protected]
npm error node_modules/react-scripts
npm error   react-scripts@"5.0.1" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/typescript
npm error   peerOptional typescript@"^3.2.1 || ^4" from [email protected]
npm error   node_modules/react-scripts
npm error     react-scripts@"5.0.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-debug-0.log

complete log

0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:C:\Users\user\AppData\Roaming\npm\node_modules\npm\npmrc
4 silly config load:file:H:\casagrande-rental\.npmrc
5 silly config load:file:C:\Users\user\.npmrc
6 silly config load:file:C:\Users\user\AppData\Roaming\npm\etc\npmrc
7 verbose title npm ci
8 verbose argv "ci"
9 verbose logfile logs-max:10 dir:C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-
10 verbose logfile C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-debug-0.log
11 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
12 silly logfile start cleaning logs, removing 1 files
13 silly logfile done cleaning log files
14 silly idealTree buildDeps
15 silly fetch manifest typescript@^3.2.1 || ^4
16 silly packumentCache full: cache-miss
17 http fetch GET 200  558ms (cache updated)
18 silly packumentCache full: set size:undefined disposed:false
19 verbose stack Error: could not resolve
19 verbose stack     at PlaceDep.failPeerConflict (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:503:25)
19 verbose stack     at new PlaceDep (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:157:21)
19 verbose stack     at #buildDepStep (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:917:18)
19 verbose stack     at async Arborist.buildIdealTree (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:181:7)
19 verbose stack     at async CI.exec (C:\Users\user\AppData\Roaming\npm\node_modules\npm\lib\commands\ci.js:63:5)
19 verbose stack     at async Npm.exec (C:\Users\user\AppData\Roaming\npm\node_modules\npm\lib\npm.js:207:9)
19 verbose stack     at async module.exports (C:\Users\user\AppData\Roaming\npm\node_modules\npm\lib\cli\entry.js:74:5)
20 error code ERESOLVE
21 error ERESOLVE could not resolve
22 error
23 error While resolving: [email protected]
23 error Found: [email protected][2m[22m
23 error [2mnode_modules/typescript[22m
23 error   [95mpeer[39m typescript@">= 2.7" from [email protected][2m[22m
23 error   [2mnode_modules/fork-ts-checker-webpack-plugin[22m
23 error     fork-ts-checker-webpack-plugin@"^6.5.0" from [email protected][2m[22m
23 error     [2mnode_modules/react-dev-utils[22m
23 error       react-dev-utils@"^12.0.1" from [email protected][2m[22m
23 error       [2mnode_modules/react-scripts[22m
23 error         react-scripts@"5.0.1" from the root project
23 error   peerOptional typescript@"^5" from [email protected][2m[22m
23 error   [2mnode_modules/i18next[22m
23 error     i18next@"^24.2.1" from the root project
23 error     [95mpeer[39m i18next@">= 23.2.3" from [email protected][2m[22m
23 error     [2mnode_modules/react-i18next[22m
23 error       react-i18next@"^15.4.0" from the root project
23 error   1 more (tsutils)
23 error
23 error Could not resolve dependency:
23 error peerOptional typescript@"^3.2.1 || ^4" from [email protected][2m[22m
23 error [2mnode_modules/react-scripts[22m
23 error   react-scripts@"5.0.1" from the root project
23 error
23 error Conflicting peer dependency: [email protected][2m[22m
23 error [2mnode_modules/typescript[22m
23 error   peerOptional typescript@"^3.2.1 || ^4" from [email protected][2m[22m
23 error   [2mnode_modules/react-scripts[22m
23 error     react-scripts@"5.0.1" from the root project
23 error
23 error Fix the upstream dependency conflict, or retry
23 error this command with --force or --legacy-peer-deps
23 error to accept an incorrect (and potentially broken) dependency resolution.
24 error
24 error
24 error For a full report see:
24 error C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-eresolve-report.txt
25 silly unfinished npm timer idealTree:buildDeps 1738099209808
26 silly unfinished npm timer idealTree:node_modules/react-scripts 1738099209809
27 verbose cwd H:\casagrande-rental
28 verbose os Windows_NT 10.0.22631
29 verbose node v20.17.0
30 verbose npm  v10.8.3
31 verbose exit 1
32 verbose code 1
33 error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-debug-0.log

I think it might be because of dependencies so there are my package.json, package-lock is too big for this format like 22 000 lines of code

package.json

{
  "name": "casagrande-rental",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@react-spring/web": "^9.7.5",
    "@testing-library/jest-dom": "^6.6.3",
    "@testing-library/react": "^16.2.0",
    "@testing-library/user-event": "^14.6.1",
    "date-fns": "^4.1.0",
    "emailjs-com": "^3.2.0",
    "framer-motion": "^12.0.3",
    "i18next": "^24.2.1",
    "i18next-browser-languagedetector": "^8.0.2",
    "leaflet": "^1.9.4",
    "react": "^18.3.1",
    "react-burger-menu": "^3.1.0",
    "react-datepicker": "^7.6.0",
    "react-dom": "^18.3.1",
    "react-i18next": "^15.4.0",
    "react-icons": "^5.4.0",
    "react-leaflet": "^4.2.1",
    "react-navigation": "^5.0.0",
    "react-responsive-carousel": "^3.2.23",
    "react-router-dom": "^7.1.3",
    "react-scripts": "5.0.1",
    "react-spring": "^9.7.5",
    "react-switch": "^7.1.0",
    "react-use-measure": "^2.1.1",
    "styled-components": "^6.1.14",
    "sweetalert2": "^11.15.10",
    "web-vitals": "^4.2.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"
    ]
  }
}
 
PS H:\casagrande-rental> npm outdated
Package        Current  Wanted  Latest  Location                    Depended by
framer-motion   12.0.3  12.0.6  12.0.6  node_modules/framer-motion  casagrande-rental
i18next         24.2.1  24.2.2  24.2.2  node_modules/i18next        casagrande-rental
react           18.3.1  18.3.1  19.0.0  node_modules/react          casagrande-rental
react-dom       18.3.1  18.3.1  19.0.0  node_modules/react-dom      casagrande-rental
react-leaflet    4.2.1   4.2.1   5.0.0  node_modules/react-leaflet  casagrande-rental

Can someone help me? I would highly appreciate yall! If you want to checkout my github project ()

I tried:

  • uninstalling typescript and getting lower version
  • uninstalling node_modules and downloading them by doing npm outdated and upgrading
  • tried even copying my code into vite but it's too much to migrate =(

I am trying to deploy and finish my first ever react webpage project. My code is purely made in js, i dont think i used typesctipt

I've already created front-end using my knowledge and ChatGPT. And I am using .git for version control

My npm install running good, when I started building it, also shows no signs of problem.

npm build serve -s build

when I am trying to deploy my webpage to firebase i am getting an error because firebase uses: npm ci & npm run build for build, and npm ci is throwing this error:

npm ci        
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/typescript
npm error   peer typescript@">= 2.7" from [email protected]
npm error   node_modules/fork-ts-checker-webpack-plugin
npm error     fork-ts-checker-webpack-plugin@"^6.5.0" from [email protected]
npm error     node_modules/react-dev-utils
npm error       react-dev-utils@"^12.0.1" from [email protected]
npm error       node_modules/react-scripts
npm error         react-scripts@"5.0.1" from the root project
npm error   peerOptional typescript@"^5" from [email protected]
npm error   node_modules/i18next
npm error     i18next@"^24.2.1" from the root project
npm error     peer i18next@">= 23.2.3" from [email protected]
npm error     node_modules/react-i18next
npm error       react-i18next@"^15.4.0" from the root project
npm error   1 more (tsutils)
npm error
npm error Could not resolve dependency:
npm error peerOptional typescript@"^3.2.1 || ^4" from [email protected]
npm error node_modules/react-scripts
npm error   react-scripts@"5.0.1" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/typescript
npm error   peerOptional typescript@"^3.2.1 || ^4" from [email protected]
npm error   node_modules/react-scripts
npm error     react-scripts@"5.0.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-debug-0.log

complete log

0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:C:\Users\user\AppData\Roaming\npm\node_modules\npm\npmrc
4 silly config load:file:H:\casagrande-rental\.npmrc
5 silly config load:file:C:\Users\user\.npmrc
6 silly config load:file:C:\Users\user\AppData\Roaming\npm\etc\npmrc
7 verbose title npm ci
8 verbose argv "ci"
9 verbose logfile logs-max:10 dir:C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-
10 verbose logfile C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-debug-0.log
11 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
12 silly logfile start cleaning logs, removing 1 files
13 silly logfile done cleaning log files
14 silly idealTree buildDeps
15 silly fetch manifest typescript@^3.2.1 || ^4
16 silly packumentCache full:https://registry.npmjs./typescript cache-miss
17 http fetch GET 200 https://registry.npmjs./typescript 558ms (cache updated)
18 silly packumentCache full:https://registry.npmjs./typescript set size:undefined disposed:false
19 verbose stack Error: could not resolve
19 verbose stack     at PlaceDep.failPeerConflict (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:503:25)
19 verbose stack     at new PlaceDep (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:157:21)
19 verbose stack     at #buildDepStep (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:917:18)
19 verbose stack     at async Arborist.buildIdealTree (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:181:7)
19 verbose stack     at async CI.exec (C:\Users\user\AppData\Roaming\npm\node_modules\npm\lib\commands\ci.js:63:5)
19 verbose stack     at async Npm.exec (C:\Users\user\AppData\Roaming\npm\node_modules\npm\lib\npm.js:207:9)
19 verbose stack     at async module.exports (C:\Users\user\AppData\Roaming\npm\node_modules\npm\lib\cli\entry.js:74:5)
20 error code ERESOLVE
21 error ERESOLVE could not resolve
22 error
23 error While resolving: [email protected]
23 error Found: [email protected][2m[22m
23 error [2mnode_modules/typescript[22m
23 error   [95mpeer[39m typescript@">= 2.7" from [email protected][2m[22m
23 error   [2mnode_modules/fork-ts-checker-webpack-plugin[22m
23 error     fork-ts-checker-webpack-plugin@"^6.5.0" from [email protected][2m[22m
23 error     [2mnode_modules/react-dev-utils[22m
23 error       react-dev-utils@"^12.0.1" from [email protected][2m[22m
23 error       [2mnode_modules/react-scripts[22m
23 error         react-scripts@"5.0.1" from the root project
23 error   peerOptional typescript@"^5" from [email protected][2m[22m
23 error   [2mnode_modules/i18next[22m
23 error     i18next@"^24.2.1" from the root project
23 error     [95mpeer[39m i18next@">= 23.2.3" from [email protected][2m[22m
23 error     [2mnode_modules/react-i18next[22m
23 error       react-i18next@"^15.4.0" from the root project
23 error   1 more (tsutils)
23 error
23 error Could not resolve dependency:
23 error peerOptional typescript@"^3.2.1 || ^4" from [email protected][2m[22m
23 error [2mnode_modules/react-scripts[22m
23 error   react-scripts@"5.0.1" from the root project
23 error
23 error Conflicting peer dependency: [email protected][2m[22m
23 error [2mnode_modules/typescript[22m
23 error   peerOptional typescript@"^3.2.1 || ^4" from [email protected][2m[22m
23 error   [2mnode_modules/react-scripts[22m
23 error     react-scripts@"5.0.1" from the root project
23 error
23 error Fix the upstream dependency conflict, or retry
23 error this command with --force or --legacy-peer-deps
23 error to accept an incorrect (and potentially broken) dependency resolution.
24 error
24 error
24 error For a full report see:
24 error C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-eresolve-report.txt
25 silly unfinished npm timer idealTree:buildDeps 1738099209808
26 silly unfinished npm timer idealTree:node_modules/react-scripts 1738099209809
27 verbose cwd H:\casagrande-rental
28 verbose os Windows_NT 10.0.22631
29 verbose node v20.17.0
30 verbose npm  v10.8.3
31 verbose exit 1
32 verbose code 1
33 error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache\_logs\2025-01-28T21_20_08_713Z-debug-0.log

I think it might be because of dependencies so there are my package.json, package-lock is too big for this format like 22 000 lines of code

package.json

{
  "name": "casagrande-rental",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@react-spring/web": "^9.7.5",
    "@testing-library/jest-dom": "^6.6.3",
    "@testing-library/react": "^16.2.0",
    "@testing-library/user-event": "^14.6.1",
    "date-fns": "^4.1.0",
    "emailjs-com": "^3.2.0",
    "framer-motion": "^12.0.3",
    "i18next": "^24.2.1",
    "i18next-browser-languagedetector": "^8.0.2",
    "leaflet": "^1.9.4",
    "react": "^18.3.1",
    "react-burger-menu": "^3.1.0",
    "react-datepicker": "^7.6.0",
    "react-dom": "^18.3.1",
    "react-i18next": "^15.4.0",
    "react-icons": "^5.4.0",
    "react-leaflet": "^4.2.1",
    "react-navigation": "^5.0.0",
    "react-responsive-carousel": "^3.2.23",
    "react-router-dom": "^7.1.3",
    "react-scripts": "5.0.1",
    "react-spring": "^9.7.5",
    "react-switch": "^7.1.0",
    "react-use-measure": "^2.1.1",
    "styled-components": "^6.1.14",
    "sweetalert2": "^11.15.10",
    "web-vitals": "^4.2.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"
    ]
  }
}
 
PS H:\casagrande-rental> npm outdated
Package        Current  Wanted  Latest  Location                    Depended by
framer-motion   12.0.3  12.0.6  12.0.6  node_modules/framer-motion  casagrande-rental
i18next         24.2.1  24.2.2  24.2.2  node_modules/i18next        casagrande-rental
react           18.3.1  18.3.1  19.0.0  node_modules/react          casagrande-rental
react-dom       18.3.1  18.3.1  19.0.0  node_modules/react-dom      casagrande-rental
react-leaflet    4.2.1   4.2.1   5.0.0  node_modules/react-leaflet  casagrande-rental

Can someone help me? I would highly appreciate yall! If you want to checkout my github project (https://github/DimaShtempelyuk/casalgrande-rental)

I tried:

  • uninstalling typescript and getting lower version
  • uninstalling node_modules and downloading them by doing npm outdated and upgrading
  • tried even copying my code into vite but it's too much to migrate =(
Share Improve this question asked Jan 29 at 9:09 Dmitro ShtempelyukDmitro Shtempelyuk 91 bronze badge 2
  • Alright so the problem was related to i18next library, this bug report helped me fixing it github/i18next/i18next/issues/2008 the issue was that my i18next of the latest version was not supporting 4.9.5 and i just needed to choose the version of i18next that would be compatible with it =) – Dmitro Shtempelyuk Commented Jan 29 at 22:51
  • FYI: create-react-app is deprecated. emailjs-com is also deprecated. – Sergey Khomushin Commented Jan 30 at 14:42
Add a comment  | 

1 Answer 1

Reset to default 0

Alright so the problem was related to i18next library, this bug report helped me fixing it github/i18next/i18next/issues/2008

the issue was that my i18next of the latest version was not supporting 4.9.5 and i just needed to choose the version of i18next that would be compatible with it =)

发布评论

评论列表(0)

  1. 暂无评论