gpt4 book ai didi

reactjs - 无法启动克隆的 react 应用程序

转载 作者:行者123 更新时间:2023-12-03 23:29:48 25 4
gpt4 key购买 nike

我刚刚从 github 将一个 react 应用程序克隆到我的本地计算机,但是当我在其上运行 npm start 时,出现此错误:

   ➜  sweet-movie-app git:(master) npm start
internal/modules/cjs/loader.js:596
throw err;
^

Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:145:3)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)

我不确定它是否是全局缺少的东西,或者本地 repo 或 npm 是否有问题。
包.json
{
"name": "sweet-movie-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"material-ui": "^0.20.0",
"react": "^16.2.0",
"react-bootstrap": "^0.32.0",
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"react-scripts": "1.1.0",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}

最佳答案

克隆 git 存储库后,尝试使用 npm install 安装所有模块从您的应用程序目录中避免此类问题。

关于reactjs - 无法启动克隆的 react 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51178763/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com