我知道类似#14209之类的先前问题,但这些问题发生在几年前,大多数解决方案是更改现在已经过时的版本。
我在项目上运行了DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'mydatabase', <*****CORRECT******
'USER': 'admin',
'PASSWORD': 'pass123',
'HOST': 'localhost',
'PORT': '5432',
}
}
,然后运行了yarn install
。创建捆绑包的输出为:
react-native start -- --reset-cache
反应本机版本:
error: bundling failed: Error: Unable to resolve module `AccessibilityInfo` from `/Users/jamil/code/myproject/node_modules/react-native/Libraries/react-native/react-native-implementation.js`: Module `AccessibilityInfo` does not exist in the Haste module map
复制步骤
System:
OS: macOS 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
Memory: 2.79 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.9.1 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.10.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
IDEs:
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: ^16.9.0 => 16.8.6
react-native: ^0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1
yarn install with dependencies:
{
"dependencies": {
"@react-native-community/async-storage": "^1.6.1",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/netinfo": "^4.1.5",
"lodash": "latest",
"moment": "^2.23.0",
"prop-types": "^15.7.2",
"react": "^16.9.0",
"react-native": "^0.60.5",
"react-native-animatable": "^1.3.2",
"react-native-background-upload": "^5.1.0",
"react-native-camera": "^3.2.0",
"react-native-circular-progress": "^1.3.0",
"react-native-contacts": "^5.0.2",
"react-native-customized-image-picker": "^0.1.4",
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "^2.3.2",
"react-native-easy-toast": "^1.2.0",
"react-native-elements": "^1.1.0",
"react-native-fbsdk": "git+https://github.com/facebook/react-native-fbsdk.git",
"react-native-firebase": "^5.5.6",
"react-native-gesture-handler": "^1.4.0",
"react-native-image-crop-picker": "^0.25.0",
"react-native-image-picker": "^1.0.2",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-linear-gradient": "^2.5.4",
"react-native-modal": "^11.3.1",
"react-native-parsed-text": "^0.0.21",
"react-native-permissions": "git+https://github.com/BaderSerhan/react-native-permissions",
"react-native-phone-input": "^0.2.4",
"react-native-progress": "^3.5.0",
"react-native-reanimated": "^1.2.0",
"react-native-share": "^2.0.0",
"react-native-size-matters": "^0.2.1",
"react-native-sms": "^1.9.0",
"react-native-svg": "^9.6.4",
"react-native-text-ticker": "^0.18.0",
"react-native-vector-icons": "^6.6.0",
"react-native-video": "^5.0.0",
"react-native-video-processing": "git+https://git@github.com/shahen94/react-native-video-processing.git",
"rn-fetch-blob": "^0.10.16",
"yarn": "^1.17.3"
},
"devDependencies": {
"babel-jest": "23.6.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"jest": "23.6.0",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
react-native start -- --reset-cache
我尝试了几件事,但是它们只是给出了不同的问题。
例如,从curl http://localhost:8081/index.bundle -o main.jsbundle
中的"module:metro-react-native-babel-preset"
中删除presets
会给我:.babelrc
,并显示跟踪消息:error: bundling failed: TypeError: Cannot read property 'bindings' of null
,将transform[stderr]: Trace: The node type SpreadProperty has been renamed to SpreadElement
添加到我的开发依赖项给了我错误:
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
`
这告诉我,也许所有这些基础都在我的依赖项中关闭了,但是我不确定有什么冲突。