javascript - react-native start 给我错误:找不到模块'source-map'
问题描述
今天,在我的项目上没有触及任何东西,react-native start
在终端上运行命令它显示了这个错误:
internal/modules/cjs/loader.js:596
throw err;
^
Error: Cannot find module 'source-map'
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 Object.<anonymous> (/Users/AlterEgo/Google Drive/React/Mono App/v2/Mono/node_modules/source-map-support/source-map-support.js:1:87)
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)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
我在谷歌上搜索过没有运气......有什么想法吗?提前致谢!
编辑:这里是我的 package.json 项目:
{
"name": "Mono",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"eslint": "^4.19.1",
"mobx": "^4.3.1",
"mobx-react": "^5.2.3",
"react": "16.4.1",
"react-native": "0.56.0",
"react-native-actionsheet": "^2.4.2",
"react-native-elements": "^0.19.0",
"react-native-i18n": "^2.0.12",
"react-native-keyboard-aware-scroll-view": "^0.5.0",
"react-native-network-info": "^3.2.2",
"react-native-picker": "^4.3.7",
"react-native-router-flux": "^4.0.0-beta.32",
"react-native-select-input-ios": "^1.1.5",
"react-native-simple-markdown": "^1.1.0",
"react-native-swipeable": "^0.6.0",
"react-native-vector-icons": "^4.5.0",
"react-native-version-number": "^0.3.2",
"react-navigation": "^1.5.8"
},
"devDependencies": {
"babel-jest": "23.0.0-alpha.0",
"babel-preset-react-native": "5.0.0",
"jest": "22.4.2",
"react-test-renderer": "^16.3.0-alpha.1"
},
"jest": {
"preset": "react-native"
}
}
节点:v10.8.0 react-native-cli:2.0.1 react-native:0.56.0
解决方案
推荐阅读
- python - 如何使用python向sharepoint o365文件所有者发送电子邮件
- javascript - 我在尝试发送嵌入时遇到错误
- wordpress - 编辑和重置所有文件夹、子文件夹和文件的权限
- firebase - Firebase 实时数据库规则自动从真变为假如何解决?
- java - JPA:通过给定列的值列表获取实体列表
- php - 我的 PHP 源代码无法在 WSL 上使用 Apache2 正确执行,始终需要重新启动以应用更改
- javascript - 如何在单个 Azure Web App 中托管 Express 静态站点和 API
- git - 如何使用 Git 开发两个独立的功能分支
- c - Mac 如何读取由旧 SGI(680x0 摩托罗拉 CPU)创建的二进制数据文件?
- python-3.x - Multiproccessing Pipe() Wrapper Broken: 有东西挂了。V5