Related
I've always used expo to build my iOS applications, recently I had to make some updates on my code and when I went to generate a new build, the following error message appeared:
TypeError: (0 , _iosPlugins(...).createInfoPlistPluginWithPropertyGuard) is not a function
error Command failed with exit code 1.
My dependencies:
"dependencies": {
"#expo-google-fonts/nunito": "^0.2.2",
"#expo/vector-icons": "^13.0.0",
"#react-native-async-storage/async-storage": "~1.17.3",
"#react-navigation/native": "^6.0.6",
"#react-navigation/native-stack": "^6.2.5",
"#unform/core": "^2.1.6",
"#unform/mobile": "^2.1.6",
"axios": "^0.24.0",
"buffer": "^6.0.3",
"date-fns": "^2.28.0",
"eas-cli": "3.0.0",
"expo": "^46.0.0",
"expo-app-loading": "~2.1.0",
"expo-av": "~12.0.4",
"expo-checkbox": "~2.2.0",
"expo-file-system": "~14.1.0",
"expo-image-picker": "~13.3.1",
"expo-sharing": "~10.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-updates": "~0.14.7",
"expo-video-thumbnails": "~6.4.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-flash-message": "^0.2.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-iphone-x-helper": "^1.3.1",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-masked-text": "^1.13.0",
"react-native-modal-selector": "^2.1.0",
"react-native-modal-selector-searchable": "^2.1.4",
"react-native-paper": "^4.11.2",
"react-native-reanimated": "^2.10.0",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-web": "~0.18.7",
"styled-components": "^5.3.3",
"yup": "^0.32.11"
}
any idea what it could be?
I had the same issue. Try:
yarn install #expo/config-plugins
<div>
<textarea />
<button onClick={() => generatePosts(20)}>test</button>
</div>
The error "Property 'textarea' does not exist on type 'JSX.IntrinsicElements" occurs in "textarea".
I don't know why such an error occurs only in the textarea tag. Could you tell me the solution?
I am attaching my package.json together.
"dependencies": {
"#craco/craco": "^6.4.3",
"#faker-js/faker": "^6.3.1",
"#testing-library/jest-dom": "^5.16.4",
"#testing-library/react": "^13.2.0",
"#testing-library/user-event": "^13.5.0",
"#types/jest": "^27.5.0",
"#types/node": "^16.11.33",
"#types/react-dom": "^18.0.3",
"json-server": "^0.17.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.3.0",
"styled-components": "^5.3.5",
"ts-node": "^10.7.0",
"typescript": "^4.6.4",
"uuid": "^8.3.2",
"web-vitals": "^2.1.4"
},
...
"devDependencies": {
"#types/react": "^18.0.9",
"#types/styled-components": "^5.1.25",
"#types/uuid": "^8.3.4",
"craco-alias": "^3.0.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.6.1"
}
I tried the monaco samples in https://github.com/microsoft/monaco-editor/blob/main/docs/integrate-esm.md
I had some success, but when I use the electron-vue, I receive the following error:
Uncaught Error: Cannot find module 'monaco-editor'
at Module._resolveFilename (module.js:543:15)
at Function.Module._resolveFilename (E:\vue-monaco-electron\node_modules\electron\dist\resources\electron.asar\common\reset-search-paths.js:35:12)
at Function.Module._load (module.js:473:25)
at Module.require (module.js:586:17)
at require (internal/module.js:11:18)
at eval (webpack:///external_%22monaco-editor%22?:1:18)
at Object.monaco-editor (http://localhost:9080/renderer.js:1790:1)
at __webpack_require__ (http://localhost:9080/renderer.js:791:30)
at fn (http://localhost:9080/renderer.js:102:20)
at eval (webpack:///./src/renderer/components/Monaco.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options:2:71)
My package config is as follows:
"dependencies": {
"axios": "^0.18.0",
"monaco-editor": "^0.26.1",
"monaco-editor-electron": "^1.0.6",
"vue": "^2.5.16",
"vue-electron": "^1.0.6",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-electron": "^1.0.0"
},
"devDependencies": {
"ajv": "^6.5.0",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.4",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-istanbul": "^4.1.6",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"cfonts": "^2.1.2",
"chai": "^4.1.2",
"chalk": "^2.4.1",
"copy-webpack-plugin": "^4.5.1",
"cross-env": "^5.1.6",
"css-loader": "^0.28.11",
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^2.0.4",
"electron-builder": "^20.19.2",
"electron-debug": "^1.5.0",
"electron-devtools-installer": "^2.2.4",
"eslint": "^4.19.1",
"eslint-config-standard": "^11.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.0.0",
"eslint-plugin-html": "^4.0.3",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"inject-loader": "^4.0.1",
"karma": "^2.0.2",
"karma-chai": "^0.1.0",
"karma-coverage": "^1.1.2",
"karma-electron": "^6.0.0",
"karma-mocha": "^1.3.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.32",
"karma-webpack": "^3.0.0",
"listr": "^0.14.3",
"mini-css-extract-plugin": "0.4.0",
"mocha": "^5.2.0",
"monaco-editor-webpack-plugin": "^4.1.1",
"node-loader": "^0.6.0",
"node-sass": "^4.9.2",
"require-dir": "^1.0.0",
"sass-loader": "^7.0.3",
"spectron": "^3.8.0",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
"vue-devtools": "^5.1.4",
"vue-html-loader": "^1.2.4",
"vue-loader": "^15.2.4",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.16",
"webpack": "^4.15.1",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.4",
"webpack-hot-middleware": "^2.22.2",
"webpack-merge": "^4.1.3"
}
The code:
<script>
import * as monaco from 'monaco-editor';
self.MonacoEnvironment = {
getWorkerUrl: function (moduleId, label) {
if (label === 'json') {
return './json.worker.bundle.js';
}
if (label === 'css' || label === 'scss' || label === 'less') {
return './css.worker.bundle.js';
}
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return './html.worker.bundle.js';
}
if (label === 'typescript' || label === 'javascript') {
return './ts.worker.bundle.js';
}
return './editor.worker.bundle.js';
},
};
export default {
mounted() {
console.log(this.$refs.container);
const container = this.$refs.container;
const editor = monaco.editor.create(container, {
fontSize: 14,
language: 'html',
folding: true,
foldingStrategy: 'indentation',
automaticLayout: true,
overviewRulerBorder: false,
scrollBeyondLastLine: false,
minimap: {
enabled: false,
},
value: 'test',
lineNumbers: 'off',
});
container.style.width = '100%';
container.style.height = '800px';
console.log(editor);
},
};
</script>
webpack config in .electron-vue
let rendererConfig = {
// devtool: '#cheap-module-eval-source-map',
entry: {
renderer: path.join(__dirname, '../src/renderer/main.js'),
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
'json.worker': 'monaco-editor/esm/vs/language/json/json.worker',
'css.worker': 'monaco-editor/esm/vs/language/css/css.worker',
'html.worker': 'monaco-editor/esm/vs/language/html/html.worker',
'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker'
},
externals: [
...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d))
],
Any idea what's going on?
Every build of my project require at least 20 minutes on iOS and 4 minutes on Android.
Searching on internet is not so normal.
I have a MacBook Air 1,6 GHz Dual-Core Intel Core i5, 8 GB RAM and SSD.
This is the build with timing:
and this is my package.json dependencies:
"#alessiocancian/react-native-actionsheet": "^2.4.11",
"#react-native-async-storage/async-storage": "^1.15.2",
"#react-native-community/datetimepicker": "^3.4.6",
"#react-native-community/geolocation": "^2.0.2",
"#react-native-community/push-notification-ios": "^1.8.0",
"#react-native-firebase/app": "^11.4.1",
"#react-native-firebase/auth": "^11.4.1",
"#react-native-firebase/firestore": "^11.4.1",
"#react-native-firebase/messaging": "^11.4.1",
"#react-native-firebase/storage": "^11.4.1",
"#react-native-masked-view/masked-view": "^0.2.3",
"#react-native-picker/picker": "^1.15.0",
"#react-navigation/bottom-tabs": "^6.0.0-next.18",
"#react-navigation/native": "^6.0.0-next.13",
"#react-navigation/stack": "^6.0.0-next.25",
"axios": "^0.21.1",
"deepmerge": "^4.2.2",
"i18n-js": "^3.8.0",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"moment-timezone": "^0.5.33",
"qs": "^6.10.1",
"react": "17.0.1",
"react-native": "0.64.2",
"react-native-actions-sheet": "^0.4.2",
"react-native-app-intro-slider": "^4.0.4",
"react-native-bootsplash": "^3.2.0",
"react-native-calendars": "^1.1255.0",
"react-native-date-picker": "^3.2.10",
"react-native-fast-image": "^8.3.4",
"react-native-fbsdk-next": "^4.3.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-google-signin": "^2.1.1",
"react-native-image-picker": "^3.3.2",
"react-native-indicators": "^0.17.0",
"react-native-keyboard-aware-scroll-view": "^0.9.3",
"react-native-localize": "^2.0.2",
"react-native-maps": "^0.28.0",
"react-native-modal": "^11.10.0",
"react-native-modal-datetime-picker": "^9.2.0",
"react-native-modal-selector": "2.0.3",
"react-native-paper": "^4.7.2",
"react-native-picker-select": "^8.0.4",
"react-native-progress-steps": "^1.3.4",
"react-native-push-notification": "^7.3.1",
"react-native-reanimated": "^2.1.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.1.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-star-rating": "^1.1.0",
"react-native-vector-icons": "^8.1.0",
"tipsi-stripe": "^9.0.0"
What can I do to reduce the xCode build time?
I already tried everything on internet, but maybe there is some kind of misconfiguration/bug.
What do you suggest to check or change?
I have constant crashes on the simulator with an event keyboardDidChangeFrame in RCTKeyboardObserver
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bridge is not set. This is probably because you've explicitly synthesized the bridge in RCTKeyboardObserver, even though it's inherited from RCTEventEmitter.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001145091ab __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000112a03f41 objc_exception_throw + 48
2 CoreFoundation 0x000000011450e372 +[NSException raise:format:arguments:] + 98
3 Foundation 0x00000001124de523 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 165
4 Ology 0x000000010e4fef88 -[RCTEventEmitter sendEventWithName:body:] + 408
5 Ology 0x000000010e543544 -[RCTKeyboardObserver keyboardDidChangeFrame:] + 116
6 CoreFoundation 0x00000001144a4fdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 CoreFoundation 0x00000001144a4eda _CFXRegistrationPost + 442
8 CoreFoundation 0x00000001144a4c22 ___CFXNotificationPost_block_invoke + 50
9 CoreFoundation 0x00000001144668c2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
10 CoreFoundation 0x0000000114465a3c _CFXNotificationPost + 652
11 Foundation 0x00000001123e5852 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
12 UIKit 0x0000000110dfa30c -[UIInputWindowController postEndNotifications:withInfo:] + 200
13 UIKit 0x0000000110dfcdeb __77-[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke_2.1049 + 84
14 UIKit 0x0000000110df518f -[UIInputWindowController performWithSafeTransitionFrames:] + 174
15 UIKit 0x0000000110dfcca6 __77-[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke.1042 + 921
16 Foundation 0x000000011245a609 __NSFireDelayedPerform + 409
17 CoreFoundation 0x00000001144992a4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
18 CoreFoundation 0x0000000114498f62 __CFRunLoopDoTimer + 1026
19 CoreFoundation 0x0000000114498b1a __CFRunLoopDoTimers + 266
20 CoreFoundation 0x0000000114490534 __CFRunLoopRun + 2308
21 CoreFoundation 0x000000011448f9b9 CFRunLoopRunSpecific + 409
22 GraphicsServices 0x0000000119d6d9c6 GSEventRunModal + 62
23 UIKit 0x00000001101ac5e8 UIApplicationMain + 159
24 Ology 0x000000010e445e7f main + 111
25 libdyld.dylib 0x000000011a5e0d81 start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
My environment is
XCode 9.1 (but I had this on previous versions as well)
Simulator: iPhone 6s
React-Native: 0.49.x
package.json
{
"name": "Ology",
"version": "0.0.1",
"private": true,
"scripts": {
"test": "jest",
"start": "node node_modules/react-native/local-cli/cli.js start",
"flow": "flow",
"flow-stop": "node_modules/.bin/flow stop",
"translate": "babel app --plugins=react-intl",
"tmp": "react-intl-cra './app/**/*.js' './app/resources/message'",
"postinstall":
"sed -i '' 's/\\[headers\\[#\"Content-Length\"\\] unsignedIntValue\\]/\\[headers\\[#\"Content-Length\"\\] intValue\\]/' ./node_modules/react-native/React/Base/RCTMultipartStreamReader.m",
"eslint-check":
"eslint --print-config .eslintrc.js | eslint-config-prettier-check"
},
"jest": {
"preset": "react-native",
"transformIgnorePatterns": [],
"snapshotSerializers": ["enzyme-to-json/serializer"],
"setupTestFrameworkScriptFile": "./test/setupJest.js",
"moduleDirectories": ["node_modules"],
"transform": {
"^.+\\.jsx?$": "babel-jest"
}
},
"rnpm": {
"assets": ["app/styles/fonts"]
},
"resolutions": {
"react-native-material-kit":
"git+https://github.com/xinthink/react-native-material-kit.git"
},
"dependencies": {
"autobind-decorator": "^2.1.0",
"cheerio-without-node-native": "^0.20.2",
"diacritic": "0.0.2",
"expect": "^1.20.2",
"harmony-proxy": "^1.0.1",
"hoist-non-react-statics": "^2.3.1",
"immutable": "^3.8.1",
"jest-enzyme": "^4.0.1",
"lodash": "^4.17.4",
"lodash-es": "^4.17.4",
"lodash.debounce": "^4.0.8",
"lodash.memoize": "^4.1.2",
"lodash.mergewith": "^4.6.0",
"lodash.sorteduniq": "^4.2.0",
"lodash.sorteduniqby": "^4.7.0",
"lodash.throttle": "^4.1.1",
"lodash.union": "^4.6.0",
"lodash.unionwith": "^4.6.0",
"lodash.uniqby": "^4.7.0",
"mime-types": "^2.1.17",
"moment": "^2.18.1",
"normalizr": "^3.2.3",
"normalizr-immutable": "0.0.4-beta12",
"path": "^0.12.7",
"react": "16.0.0-beta.5",
"react-immutable-proptypes": "^2.1.0",
"react-intl": "^2.4.0",
"react-intl-redux": "^0.6.0",
"react-native": "0.49.5",
"react-native-action-button": "^2.8.0",
"react-native-animatable": "^1.2.3",
"react-native-autolink": "^1.1.1",
"react-native-code-push": "5.1.3-beta",
"react-native-cookies": "^3.2.0",
"react-native-deprecated-custom-components": "^0.1.1",
"react-native-drawer": "^2.3.0",
"react-native-fetch-blob": "^0.10.8",
"react-native-fs": "^2.5.2",
"react-native-image-crop-picker": "^0.18.1",
"react-native-immutable-list-view": "^0.6.2",
"react-native-invertible-scroll-view": "^1.0.0",
"react-native-keyboard-aware-scroll-view": "^0.4.1",
"react-native-keychain": "2.0.0-rc",
"react-native-lightbox": "^0.7.0",
"react-native-linear-gradient": "^2.3.0",
"react-native-material-bottom-navigation": "^0.5.2",
"react-native-material-kit": "^0.4.1",
"react-native-modalbox": "^1.4.1",
"react-native-parallax-scroll-view": "^0.19.0",
"react-native-photo-view": "^1.5.2",
"react-native-popup-menu": "^0.8.0",
"react-native-progress": "^3.3.0",
"react-native-scrollable-tab-view": "^0.8.0",
"react-native-sglistview": "^0.4.3",
"react-native-store": "^0.4.1",
"react-native-swiper": "^1.5.13",
"react-native-vector-icons": "^4.2.0",
"react-navigation": "1.0.0-beta.13",
"react-redux": "^5.0.5",
"react-swipeable-views": "^0.12.5",
"react-swipeable-views-native": "^0.12.5",
"realm": "^2.0.2",
"redux": "^3.7.2",
"redux-form": "^7.1.1",
"redux-logger": "^3.0.6",
"redux-middleware-oneshot": "^0.1.1",
"redux-persist": "^4.8.2",
"redux-persist-immutable": "^4.3.0",
"redux-persist-transform-immutable": "^4.3.0",
"redux-thunk": "^2.2.0",
"reselect": "^3.0.1",
"route-parser": "0.0.5",
"webstomp-client": "^1.0.8"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^7.2.3",
"babel-plugin-module-resolver": "3.0.0-beta.5",
"babel-plugin-react-intl": "^2.3.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
"babel-preset-airbnb": "^2.4.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-react-native": "^4.0.0",
"babel-preset-react-native-stage-0": "^1.0.1",
"babel-register": "^6.24.1",
"chai": "^4.1.0",
"chai-as-promised": "^7.1.1",
"chai-enzyme": "^0.8.0",
"chai-immutable": "^1.6.0",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.0.0",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.2",
"enzyme-to-json": "^3.1.4",
"eslint": "^4.7.2",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.7.0",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-react-native": "^3.1.0",
"eslint-plugin-standard": "^3.0.1",
"expect.js": "^0.3.1",
"flow": "^0.2.3",
"flow-bin": "^0.56.0",
"immutablediff": "^0.4.3",
"jest": "^21.2.1",
"jshint": "^2.9.5",
"mocha": "^3.4.2",
"react-addons-test-utils": "^15.6.2",
"react-dom": "16.0.0-beta.5",
"react-intl-cra": "^0.2.8",
"react-native-mock": "^0.3.1",
"react-test-renderer": "^16.0.0",
"redux-debounce": "^1.0.1",
"redux-debounced": "^0.4.0",
"redux-devtools": "^3.4.0",
"redux-devtools-dock-monitor": "^1.1.2",
"redux-devtools-log-monitor": "^1.3.0",
"redux-mock-store": "^1.2.3",
"regenerator-runtime": "^0.11.0",
"remote-redux-devtools": "^0.5.12",
"sinon": "^4.0.0"
}
}
Any suggestions?
This was just a dumb mistake. I implemented it like I would on the web.
I did it like so
componentDidMount() {
this.keyboardShowListener = Keyboard.addListener('keyboardDidShow', this.keyboardDidShow);
this.keyboardHidenListener = Keyboard.addListener('keyboardDidHide', this.keyboardDidHide);
}
componentWillUnmount() {
this.keyboardShowListener && this.keyboardShowListener.remove();
this.keyboardHidenListener && this.keyboardHidenListener.remove();
}
and it should have been
componentDidMount() {
Keyboard.addListener('keyboardDidShow', this.keyboardDidShow);
Keyboard.addListener('keyboardDidHide', this.keyboardDidHide);
}
componentWillUnmount() {
Keyboard.removeListener('keyboardDidShow');
Keyboard.removeListener('keyboardDidHide');
}