无法在 CloudFlare Pages 构建 React 项目

问题描述 投票:0回答:1

相信我,我对此一无所知,我可以与您分享错误:

Compiled with problems:

ERROR in ./node_modules/@react-spring/core/dist/index.mjs 1596:0-45

Module not found: Error: Can't resolve '@react-spring/types/animated' in '/Users/oguzhantufenk/Desktop/Siblings projects/Barbearians-Front-End/node_modules/@react-spring/core/dist'
Did you mean 'animated.js'?
BREAKING CHANGE: The request '@react-spring/types/animated' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.


ERROR in ./node_modules/@react-spring/core/dist/index.mjs 1597:0-50

Module not found: Error: Can't resolve '@react-spring/types/interpolation' in '/Users/oguzhantufenk/Desktop/Siblings projects/Barbearians-Front-End/node_modules/@react-spring/core/dist'
Did you mean 'interpolation.js'?
BREAKING CHANGE: The request '@react-spring/types/interpolation' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

我的包裹是:

 "@coinbase/wallet-sdk": "^3.6.0",
    "@react-three/fiber": "^8.10.1",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "@web3modal/ethereum": "^2.0.0-rc.1",
    "@web3modal/react": "^2.0.0-rc.1",
    "axios": "^1.1.3",
    "bn.js": "^5.2.1",
    "ethers": "^5.7.2",
    "framer-motion": "^8.0.2",
    "gsap": "file:gsap-bonus.tgz",
    "include-media": "^1.4.10",
    "radium": "^0.26.2",
    "react": "^18.2.0",
    "react-countup": "^6.4.0",
    "react-dom": "^18.2.0",
    "react-fast-marquee": "^1.3.5",
    "react-parallax-mouse": "^2.0.1",
    "react-player": "^2.11.0",
    "react-responsive": "^9.0.2",
    "react-router-dom": "^6.6.1",
    "react-scripts": "5.0.1",
    "react-social-login-buttons": "^3.6.1",
    "react-toastify": "^9.1.1",
    "sass": "^1.57.1",
    "three": "^0.148.0",
    "typescript": "^4.9.3",
    "use-sound": "^4.0.1",
    "wagmi": "^0.10.4",
    "web-vitals": "^2.1.4",
    "web3": "^1.8.1",
    "web3modal": "^1.9.9"

所以今天开始报错,之前是正常的。我不知道这个错误。

reactjs webpack react-spring
1个回答
0
投票

添加以下依赖项以删除其中一个错误:

npm i [email protected]

© www.soinside.com 2019 - 2024. All rights reserved.