【发布时间】:2023-03-12 15:55:02
【问题描述】:
当我运行“npm run dev”时,它给了我这个错误:
服务器运行在http://localhost:1234
???未找到条目。
在 Bundler.bundle (/Users/igoraccebas/node_modules/parcel-bundler/src/Bundler.js:275:17)
npm 错误!代码生命周期
npm 错误!错误号 1
npm 错误! @开发者:parcel react/src/react.html
npm 错误!退出状态 1
npm 错误!
npm 错误! @dev 脚本失败。
npm 错误!这可能不是 npm 的问题。上面可能还有额外的日志输出。
这是我的 package.json 文件
{
"name": "adopt-me",
"version": "1.0.0",
"description": "An app to teach you to write React",
"main": "react/src/App.js",
"scripts": {
"test": "",
"format": "prettier --write \"src/**/*.{js,jsx}\"",
"lint": "eslint \"src/**/*.{js,jsx}\" --quiet",
"dev": "parcel react/src/react.html"
},
"repository": {
"type": "git",
"url": "git+https://github.com/btholt/complete-intro-to-react-v4.git"
},
"author": "Brian Holt <btholt@gmail.com>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/btholt/complete-intro-to-react-v4/issues"
},
"homepage": "https://github.com/btholt/complete-intro-to-react-v4#readme",
"devDependencies": {
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.6",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"eslint": "^5.3.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.10.0",
"parcel-bundler": "^1.12.3",
"prettier": "^1.14.2"
},
"dependencies": {
"@reach/router": "^1.1.1",
"petfinder-client": "^0.0.3",
"react": "^16.4.2",
"react-dom": "^16.4.2"
}
}
【问题讨论】:
-
你先运行 npm install 了吗?
-
我确实运行了 npm install