- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
在一个现有的项目上,已经运行了好几个月,并且已经在 iOS 和 Android 的 AppStore 中,我们现在因为这个错误而中断了开发:
babelHelpers.typeof 不是函数
我们所做的就是尝试将基于 RN-0.26 的应用程序升级到更新的版本。但即使在回滚之后,错误仍然存在。
我们清除了 watchman,多次重置了 packager。这里没有任何帮助。
我们的 package.json 看起来像这样:
{
"version": "0.0.1",
"private": true,
"scripts": {
"reset": "rm -rf node_modules/ && npm cache clear && watchman watch-del-all && npm i",
"start": "node node_modules/react-native/local-cli/cli.js start --reset-cache",
"testflight": "fastlane beta",
"android-device": "adb reverse tcp:8081 tcp:8081 && react-native run-android",
"lint": "jslint **.js",
"test": "mocha test/",
"generate-apk": "cd android && ./gradlew assembleRelease && open ./app/build/outputs/apk/",
"install-apk": "cd android && ./gradlew installRelease",
},
"devDependencies": {
"jshint": "latest",
"mocha": "latest",
"eslint": "^2.3.0",
"eslint-config-standard": "^5.1.0",
"eslint-config-standard-react": "^2.3.0",
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-react": "^4.1.0",
"eslint-plugin-react-native": "^1.0.0",
"eslint-plugin-standard": "^1.3.2"
},
"dependencies": {
"apsl-react-native-button": "^2.5.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.11.1",
"es6-promisify": "^4.1.0",
"fetch-stuff": "^1.0.1",
"iap-receipt-validator": "^1.0.2",
"immutable": "^3.8.1",
"js-sha256": "^0.3.0",
"keymirror": "^0.1.1",
"lodash.difference": "^4.3.0",
"lodash.find": "^4.4.0",
"lodash.partialright": "^4.1.4",
"lodash.remove": "^4.5.0",
"lodash.shuffle": "^4.0.0",
"lodash.uniq": "^4.3.0",
"moment": "^2.14.1",
"normalizr": "^2.1.0",
"react": "15.0.2",
"react-native": "0.26.2",
"react-native-animatable": "^0.6.1",
"react-native-app-intro": "^1.0.2",
"react-native-billing": "^1.3.0",
"react-native-code-push": "^1.12.2-beta",
"react-native-code-push-saga": "^1.0.0",
"react-native-console-panel": "0.0.9",
"react-native-debug-stylesheet": "^0.1.1",
"react-native-drawer": "file:./custom_modules/react-native-drawer",
"react-native-extra-dimensions-android": "^0.17.0",
"react-native-fabric": "^0.2.3",
"react-native-fetch-blob": "^0.4.2",
"react-native-fs": "^1.4.0",
"react-native-gifted-spinner": "0.0.4",
"react-native-google-analytics-bridge": "^2.1.0",
"react-native-htmlview": "^0.5.0",
"react-native-i18n": "0.0.8",
"react-native-image-progress": "^0.5.0",
"react-native-in-app-utils": "^4.0.0",
"react-native-keyboard-aware-scroll-view": "^0.1.0",
"react-native-navbar": "^1.5.0",
"react-native-router-flux": "^3.30.0",
"react-native-search-bar": "^2.11.0",
"react-native-side-menu": "^0.19.0",
"react-native-simple-store": "^1.0.1",
"react-native-sound": "^0.8.3",
"react-native-sqlite-storage": "^2.1.6",
"react-native-swiper": "^1.4.4",
"react-native-vector-icons": "^2.0.2",
"react-redux": "^4.4.5",
"react-timer-mixin": "^0.13.3",
"redux": "^3.5.2",
"redux-form": "^6.0.0-alpha.15",
"redux-logger": "^2.6.1",
"redux-saga": "^0.10.4",
"redux-thunk": "^2.1.0",
"reselect": "^2.5.1",
"rn-viewpager": "^1.1.2",
"rnpm": "^1.7.0",
"tween-functions": "^1.2.0"
}
}
有人能帮忙吗?
最佳答案
出现此问题是因为您的项目(通过自定义 .babelrc)或您的依赖项之一依赖于不适用于 React Native 的 es2015
预设。这样做的原因是因为它包含 transform-typeof-symbol
,它调用未与 React Native 捆绑在一起的 babelHelpers.typeof
。
如果你有一个自定义的 babelrc
- 解决方案很简单,只需删除这个预设。之后,重新启动没有缓存的打包程序,你应该设置好了。
注意:可能是您的某个依赖项使用了该预设 - 在这种情况下,除了尝试 fork 它并自行删除预设外,您别无他法。
关于javascript - ReactNative : babelHelpers. typeof 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39016025/
我正在使用 rollup 和 babel 来转译一些 ES6 代码并将结果捆绑到一个文件中,但我遇到了 babelHelpers 对象的一些问题。 rollup.config.js: export d
在一个现有的项目上,已经运行了好几个月,并且已经在 iOS 和 Android 的 AppStore 中,我们现在因为这个错误而中断了开发: babelHelpers.typeof 不是函数 我们所做
我已经检查了 stackoverflow 上的其他问题,但没有一个解决方案有效,这就是我重复这个问题的原因。 如标题所示,我在运行测试用例时遇到错误。我还没有在设备上运行它。 我也尝试了 https:
使用最新版本的 react-native 创建的新项目在运行(/调试)时抛出 javascript 错误。在模拟器上测试了这个。 [fatal][tid:main] TypeError: babelH
我将 React-Native 从 0.14.0 更新到 0.16.0,从现在开始,我在运行时遇到错误: 以下是 npm 依赖项: "dependencies": { "async": "^1.5
我是一名优秀的程序员,十分优秀!