actually, when starting the app, using react-native run-android, it showed me an error "error Failed to run jetifier.", so i run with react-native run-android --no-jetifier, and when starting, it shows the following error:
D:\work\OMR_APP_GITHUB\node_modules\metro-hermes-compiler\src\emhermesc.js:77
throw ex;
^
Error: UNKNOWN: unknown error, lstat 'D:\work\OMR_APP_GITHUB\node_modules\.react-native-6bCcSflQ\React\Base\RCTModuleRegistry.m'
Emitted 'error' event on NodeWatcher instance at:
at NodeWatcher.checkedEmitError (D:\work\OMR_APP_GITHUB\node_modules\sane\src\node_watcher.js:143:12)
at Walker.emit (events.js:400:28)
at D:\work\OMR_APP_GITHUB\node_modules\walker\lib\walker.js:52:12
at FSReqCallback.oncomplete (fs.js:192:21) {
errno: -4094,
code: 'UNKNOWN',
syscall: 'lstat',
path: 'D:\\work\\OMR_APP_GITHUB\\node_modules\\.react-native-6bCcSflQ\\React\\Base\\RCTModuleRegistry.m'
}
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
i tried the solution in this post > React Native start failed with error code -4094 how to solve this ONCE for ALL?
and it still doesn't work, i also tried to remove the node modules, but, it gets the error:
0x80070570, the file or directory is corrupted and unreadable.
this is my package.json:
{
"name": "OMR_APP",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#react-native-community/masked-view": "^0.1.11",
"#react-native-firebase/app": "^12.8.0",
"#react-navigation/native": "^6.0.2",
"#react-navigation/native-stack": "^6.1.0",
"app-icon": "^0.13.2",
"formik": "^2.2.9",
"install": "^0.13.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-native": "0.65.1",
"react-native-camera": "^4.2.1",
"react-native-document-picker": "^6.0.4",
"react-native-dropdown-picker": "^5.1.28",
"react-native-elements": "^3.4.2",
"react-native-form-validator": "^0.1.3",
"react-native-gesture-handler": "^1.10.3",
"react-native-ico-material-design": "^3.3.1",
"react-native-paper": "^4.9.2",
"react-native-reanimated": "^2.2.2",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.7.2",
"react-native-simple-radio-button": "^2.7.4",
"react-native-svg": "^12.1.1",
"react-native-vector-icons": "^8.1.0",
"yup": "^0.32.9"
},
"devDependencies": {
"#babel/core": "^7.15.5",
"#babel/runtime": "^7.15.4",
"#react-native-community/eslint-config": "^3.0.1",
"babel-jest": "^27.2.0",
"eslint": "^7.32.0",
"jest": "^27.2.0",
"jetifier": "^2.0.0",
"metro-react-native-babel-preset": "^0.66.2",
"react-native-codegen": "^0.0.7",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
}
Related
the problem is maybe the same as the link below :
https://forum.vuejs.org/t/spread-operator-not-working-in-webview-android/74893/7
but the different is, im using laravel mix and vue 2.6.11
here is my package.json
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"build-report": "vue-cli-service build --report",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "rename .env .env_ && rename .env_ .env && php artisan ziggy:generate && cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js && rename .env .env.production && rename .env_ .env"
},
"devDependencies": {
"#babel/plugin-proposal-object-rest-spread": "^7.17.3",
"#fortawesome/fontawesome-free": "^5.12.0",
"#inertiajs/inertia": "^0.11.0",
"#inertiajs/inertia-vue": "^0.8.0",
"#inertiajs/progress": "^0.2.7",
"#mdi/font": "^4.9.95",
"#mdi/js": "^5.9.55",
"browser-sync": "^2.26.13",
"browser-sync-webpack-plugin": "^2.3.0",
"cross-env": "^7.0.3",
"deepmerge": "^4.2.2",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-vue": "^7.5.0",
"fibers": "^5.0.0",
"font-awesome": "^4.7.0",
"laravel-mix": "5.0.9",
"lodash": "^4.17.20",
"material-design-icons-iconfont": "^6.4.1",
"resolve-url-loader": "^3.1.2",
"roboto-fontface": "^0.10.0",
"sass": "^1.49.8",
"sass-loader": "^10.1.1",
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11",
"vuetify": "^2.4.2",
"vuetify-loader": "1.4.3"
},
"dependencies": {
"#chenfengyuan/vue-countdown": "^1.1.5",
"#mdi/light-font": "^0.2.63",
"#types/ziggy-js": "^0.9.0",
"#vue/cli-service": "^5.0.4",
"axios": "^0.21.1",
"dotenv": "^16.0.0",
"eslint": "^7.18.0",
"laravel-echo": "^1.10.0",
"lottie-player-vue": "0.0.16",
"object-to-formdata": "^4.1.0",
"pusher-js": "^7.0.2",
"qrcode": "^1.5.0",
"read-excel-file": "^5.2.28",
"sweetalert2": "^9.17.2",
"v-money": "^0.8.1",
"vee-validate": "^2.2.15",
"vform": "^1.0.1",
"vue-axios": "^2.1.5",
"vue-cli": "^2.9.6",
"vue-countdown": "^1.0.4",
"vue-excel-xlsx": "^1.2.2",
"vue-moment": "^4.1.0",
"vue-qrcode-component": "^2.1.1",
"vue-resource": "^1.5.3",
"vue-sessionstorage": "^1.0.0",
"vue-social-auth": "^1.4.9",
"vue-socket.io": "^3.0.10",
"vue2-storage": "^5.0.0",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2",
"vuex-map-fields": "^1.4.1",
"ziggy": "^2.4.0",
"ziggy-js": "^1.4.3"
}
when i call the url in webview using android studio. it says "[INFO:CONSOLE(2)] "Uncaught SyntaxError: Unexpected token ..."".
maybe the spread operator called by mistake. ?
here is my webpack.mix.js
mix
.webpackConfig({
resolve: {
alias: {
vue$: 'vue/dist/vue.runtime.esm.js',
'#': path.resolve('resources/js'),
ziggy: path.resolve('vendor/tightenco/ziggy/dist/vue')
}
},
plugins: [new VuetifyLoaderPlugin()],
})
.version()
.sourceMaps()
i still dont know how to fix this problem.
I am developing an expo app with react native. However I suddenly started encountering the following error [ check print ]
"React Native version mismatch.
JavaScript version: 0.63.3
Native version: 0.64.2"
This error however doesn't appear on my console, only on the emulator.
This is my packge.json file
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll",
"updateAppSyncLayer": "amplify api gql-compile && amplify codegen && babel src/graphql --extensions \".ts\" --config-file ./compile.babel.config.json -d ./amplify/backend/function/outgoingappawsgraphqlQueriesLayer/opt/graphql/"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#aws-amplify/core": "^4.2.9",
"#babel/preset-typescript": "^7.15.0",
"#expo-google-fonts/montserrat": "^0.1.0",
"#expo/vector-icons": "^12.0.0",
"#react-native-async-storage/async-storage": "~1.15.0",
"#react-native-community/datetimepicker": "3.5.2",
"#react-native-community/masked-view": "0.1.10",
"#react-native-community/netinfo": "6.0.2",
"#react-navigation/bottom-tabs": "^5.11.1",
"#react-navigation/native": "^5.8.9",
"#react-navigation/stack": "^5.12.6",
"#types/react-native-autocomplete-input": "^5.0.0",
"#types/react-native-check-box": "^2.1.2",
"#types/react-native-datepicker": "^1.7.1",
"#types/react-native-read-more-text": "^1.0.0",
"#types/uuid": "^8.3.1",
"aws-amplify": "^4.2.9",
"aws-amplify-react-native": "^5.0.3",
"expo": "^43.0.0",
"expo-app-loading": "~1.2.1",
"expo-barcode-scanner": "~11.1.2",
"expo-contacts": "~10.0.3",
"formik": "^2.2.6",
"moment": "^2.29.1",
"react": "17.0.1",
"react-native": "0.63.3",
"react-native-autocomplete-dropdown": "^1.1.4",
"react-native-autocomplete-input": "^5.0.2",
"react-native-check-box": "^2.1.7",
"react-native-datepicker": "^1.7.2",
"react-native-dropdown-picker": "^5.1.21",
"react-native-gesture-handler": "~1.10.2",
"react-native-multiple-select": "^0.5.7",
"react-native-paper": "^4.8.1",
"react-native-phone-number-input": "^2.1.0",
"react-native-qrcode-svg": "^6.1.1",
"react-native-read-more-text": "^1.1.2",
"react-native-safe-area": "^0.5.1",
"react-native-safe-area-context": "^3.3.2",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "~3.8.0",
"react-native-svg": "12.1.1",
"uuid": "^8.3.2",
"yup": "^0.32.9"
},
"devDependencies": {
"#babel/cli": "^7.15.4",
"#babel/core": "^7.12.9",
"#babel/preset-env": "^7.15.6",
"#types/react": "~17.0.21",
"#types/react-native": "0.63.3",
"jest-expo": "^43.0.0",
"typescript": "~4.3.5"
},
"private": true
}
As you can see I have already set my react-native package to 0.63.3, uninstalled and reinstalled node-modules but I still get the error message.
What can I do?
We have a NextJs app that is running for couple of years in production.
Recently I added storybook-addon-pseudo-states addon ran the code locally and tested and pushed to production. The app was running perfectly locally. believe it or not after pushing to production, production entirely went down with this weird error.
{"statusCode":500,"code":"MODULE_NOT_FOUND","error":"Internal Server Error","message":"Cannot find module 'react-is'\nRequire stack:\n- /opt/webapp/node_modules/styled-components/dist/styled-components.cjs.js\n- /opt/webapp/.next/server/pages/_document.js\n- /opt/webapp/node_modules/next/dist/next-server/server/require.js\n- /opt/webapp/node_modules/next/dist/next-server/server/load-components.js\n- /opt/webapp/node_modules/next/dist/next-server/server/api-utils.js\n- /opt/webapp/node_modules/next/dist/next-server/server/next-server.js\n- /opt/webapp/node_modules/next/dist/server/next.js\n- /opt/webapp/server.js"}
This is our package.json.
{
"license": "UNLICENSED",
"private": true,
"scripts": {
"dev": "NODE_ENV=development yarn server-remove-types && yarn server-watch",
"build": "yarn server-remove-types && yarn server-compile && yarn server-copy && next build",
"server-remove-types": "flow-remove-types --all --pretty src/server --out-dir .untyped/server",
"server-compile": "ncc build .untyped/server/index.js --out .dist --minify --external next --external grpc",
"server-copy": "node ./util/copy.js --from .dist/index.js --to server.js",
"server-watch": "yarn server-watch-remove-types & yarn server-watch-compile & yarn server-watch-nodemon",
"server-watch-nodemon": "node .dist/index.js",
"server-watch-remove-types": "node util/watch-flow-remove-types.js --from src/server --to .untyped/server",
"server-watch-compile": "yarn server-compile --watch",
"lint-javascript": "eslint src",
"format": "eslint src --fix",
"type-install": "flow-typed install",
"type-upgrade": "flow-typed update",
"type-check": "flow check --color=always --show-all-errors",
"test-unit": "NODE_ENV=test jest --config ./config/jest.unit.config.js --colors",
"test-unit-watch": "yarn test-unit --watchAll --coverage false",
"test-unit-update-snapshots": "yarn test-unit --updateSnapshot",
"test-endpoints": "NODE_ENV=test jest --config ./config/jest.endpoints.config.js src/test/endpoints.spec.js",
"test-bdd": "echo 'Not implemented.'",
"test-contract": "echo 'Not implemented.'",
"test-e2e": "echo 'Not implemented.'",
"test-e2e-debug": "echo 'Not implemented.'",
"storybook": "start-storybook -p 3001",
"build-storybook": "build-storybook -o ./src/stories/storybook"
},
"engines": {
"node": ">=12"
},
"browserslist": [
"extends #dpgr/browserslist-config"
],
"dependencies": {
"#dpgr/browserslist-config": "^1.1.0",
"#dpgr/react-components": "^3.7.0",
"#sentry/browser": "6.10.0",
"#sentry/node": "6.10.0",
"#sentry/tracing": "6.10.0",
"#tippy.js/react": "^2.2.3",
"#vercel/ncc": "^0.31",
"axios": "0.18.1",
"babel-plugin-superjson-next": "^0.3.1",
"chart.js": "^2.9.4",
"chokidar": "^3.3.1",
"color": "^3.1.0",
"convert-array-to-csv": "^1.0.9",
"cookie": "^0.4.0",
"date-fns": "^2.4.1",
"dompurify": "^2.0.2",
"draft-js": "^0.11.0",
"draft-js-export-html": "^1.3.3",
"draft-js-import-html": "^1.3.3",
"fastify": "^2.0.0",
"fastify-cookie": "^3.0.2",
"flow-remove-types": "^2.115.0",
"focus-visible": "^5.0.0",
"formik": "^1.3.2",
"fs": "^0.0.1-security",
"google-protobuf": "^3.14.0",
"grpc": "^1.24.4",
"grpc-web": "^1.2.1",
"http-status-codes": "^1.3.0",
"iban": "^0.0.14",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.11",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"next": "^10.0.0",
"next-cookies": "^2.0.3",
"next-redux-wrapper": "^7.0.0",
"node-xlsx": "^0.15.0",
"nodemon": "^2.0.2",
"nprogress": "^0.2.0",
"openid-client": "^3.13.0",
"p-queue": "^6.2.1",
"path-to-regexp": "^6.2.0",
"re-reselect": "^3.0.0",
"react": "^17.0.1",
"react-aria-modal": "^4.0.0",
"react-chartjs-2": "^2.11.1",
"react-copy-to-clipboard": "^5.0.1",
"react-datepicker": "^3.0",
"react-dom": "^17.0.1",
"react-paginate": "^6.3.0",
"react-redux": "^7.2.2",
"react-select": "^3.0.8",
"redux": "^4.0.0",
"redux-saga": "^1.1.1",
"regenerator-runtime": "^0.13.3",
"reselect": "^4.0.0",
"styled-components": "^5.0.0",
"styled-reboot": "^4.0.1",
"superjson": "^1.7.5",
"uuid": "^3.3.2",
"xlsx": "^0.17.1",
"yup": "^0.28.0"
},
"devDependencies": {
"#babel/core": "^7.13.15",
"#babel/eslint-parser": "^7.13.14",
"#babel/helper-builder-react-jsx": "^7.15.4",
"#babel/helper-builder-react-jsx-experimental": "^7.12.11",
"#babel/plugin-transform-flow-strip-types": "^7.4.4",
"#storybook/addon-actions": "6.3.12",
"#storybook/addon-controls": "^6.3.12",
"#storybook/addon-essentials": "6.3.12",
"#storybook/addon-links": "6.3.12",
"#storybook/react": "6.3.12",
"#testing-library/jest-dom": "^5.11.9",
"#testing-library/react": "12.0.0",
"#testing-library/react-hooks": "7.0.1",
"#wojtekmaj/enzyme-adapter-react-17": "^0.4.1",
"babel-loader": "^8.0.5",
"babel-plugin-inline-react-svg": "^1.1.1",
"babel-plugin-module-resolver": "^4.0",
"babel-plugin-styled-components": "^1.10.0",
"css-loader": "6.4.0",
"enzyme": "^3.11.0",
"enzyme-to-json": "^3.6.1",
"eslint": "^7.24.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-import-resolver-babel-module": "^5.3.0",
"eslint-plugin-flowtype": "^4.3.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^23.1.1",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react-hooks": "^4.2",
"fastify-http-proxy": "^2.1.0",
"flow-bin": "^0.110.0",
"flow-typed": "^2.4.0",
"jest": "^26.6.3",
"jest-styled-components": "^7.0.5",
"mockdate": "^2.0.5",
"pretty": "^2.0.0",
"redux-devtools-extension": "^2.13.9",
"redux-mock-store": "^1.5.3",
"redux-saga-test-plan": "^4.0.1",
"redux-testkit": "^1.0.6",
"storybook-addon-designs": "6.2.0",
"storybook-addon-next-router": "3.0.8",
"style-loader": "3.3.0",
"supertest": "^6.1.6"
},
"peerDependencies": {}
}
These are the only changes made to package.json, plus few small changes in storybook stories.
Changes to package.json
Any idea what is the root cause for this fatal production only error?
The error says you're missing the library react-is and based on your package.json it doesn't appear to be installed.
The two scenarios that come to mind to explain erroring after package install / only in production.
Scenario 1
Someone could have manually deleted react-is from the package.json at some point in time after the last package manager sync and prior to your screenshot.
Package managers sync the changes in package.json when performing installs, updates, and uninstalls. Meaning, when you added the storybook plugin it removed the react-is package because it was no longer listed in the package.json file.
Scenario 2
Since it's only happening in production the app might not be using react-is but it is still included in a file.
import ReactIs from 'react-is'
Search your app for react-is - if it's not used, remove the unused statements - if it's used you need to install the package.
Any something wrong with my package.json? The test is green when I run npm run test. But when I run npm run dev, the test is also run. There is no command config I write that it should run test when I run npm run dev
here is my package.json
"name": "domundotech-cashier",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www",
"dev": "set DEBUG=domundotech-cashier:* & nodemon --exec & npm start",
"test": "node ./node_modules/mocha/bin/mocha \"*/*.spec.js\""
},
"dependencies": {
"acorn": "^8.1.0",
"body-parser": "^1.19.0",
"cookie-parser": "~1.4.4",
"cors": "^2.8.5",
"debug": "~2.6.9",
"dotenv": "^8.2.0",
"eslint-plugin-jest": "^24.3.3",
"express": "~4.16.1",
"express-useragent": "^1.0.15",
"http-errors": "~1.6.3",
"install": "^0.13.0",
"jade": "~1.11.0",
"moment-timezone": "^0.5.33",
"morgan": "~1.9.1",
"mysql2": "^2.2.5",
"node-device-detector": "^1.3.4",
"npm": "^7.8.0",
"request": "^2.88.2",
"sequelize": "^6.6.2",
"typescript": "^4.2.3"
},
"devDependencies": {
"sequelize-test-helpers": "^1.3.2",
"proxyquire": "^2.1.3",
"mocha": "^8.3.2",
"chai": "^4.3.4",
"sinon": "^10.0.0",
"sinon-chai": "^3.6.0",
"supertest": "^6.1.3",
"#typescript-eslint/eslint-plugin": "^4.20.0",
"#typescript-eslint/parser": "^4.20.0",
"eslint": "^7.23.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"sequelize-cli": "^6.2.0"
}
}
and this for the error logs
Describe is defined in my test file. For now, I found the solution that I should ignore (-i) test files when executing nodemon :)
"start": "node ./bin/www",
"dev": "set DEBUG=domundotech-cashier:* & nodemon -i ./test & npm start",
"test": "mocha \"./test/*/*.spec.js\""
},
And I refactor my project structure too
I'm trying to update an Expo app from SDK 27 to 33. I've gotten to 30 without issue, but getting to 31 is proving tricky. When I try to run the code after changing my package.json, it gives me the following error:
Unable to resolve "../Database/caatch.db" from
"Util\DatabaseConnector.js"
I've inherited this code as part of an ongoing project and am attempting to update it to a supported SDK both for myself and to whom will be working on it next.
I've tried searching, changing the string argument (below) around. caatch.db is there. I'm just not sure why it's not seeing it after the update. I've also checked the Expo docs and this seems to be the correct syntax.
Some snippets from app.json since that's what I'm changing to install the updates:
"devDependencies": {
"babel-preset-expo": "^5.0.0",
"jest-expo": "~31.0.0",
"react-test-renderer": "16.5.0",
"react-native-scripts": "1.14.0"
},
"main":
"./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/vector-icons": "^9.0.0",
"#haskkor/react-native-pincode": "^1.5.4",
"expo": "^31.0.0",
"moment": "^2.22.2",
"native-base": "^2.12.1",
"prop-types": "^15.6.1",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
"react-native-accordion": "^1.0.1",
"react-native-calendars": "^1.19.3",
"react-native-chart-kit": "^1.1.5",
"react-native-collapsible": "^0.12.0",
"react-native-communications": "^2.2.1",
"react-native-dialog": "^5.4.0",
"react-native-elements": "^0.19.1",
"react-native-elevated-view": "0.0.6",
"react-native-image-view": "^2.1.1",
"react-native-image-zoom-viewer": "^2.2.13",
"react-native-input-scroll-view": "^1.7.1",
"react-native-keyboard-aware-scroll-view": "^0.6.0",
"react-native-keyboard-spacer": "^0.4.1",
"react-native-modal-datetime-picker": "^6.0.0",
"react-native-modal-selector": "0.0.28",
"react-native-multiple-select-list": "^1.0.4",
"react-native-open-maps": "^0.3.1",
"react-native-picker-select": "^4.4.0",
"react-native-pin-code": "^0.4.1",
"react-native-scalable-image": "^0.4.0",
"react-native-slider": "^0.11.0",
"react-native-snap-carousel": "^3.7.4",
"react-native-snap-slider": "^0.3.0",
"react-native-swipeable": "^0.6.0",
"react-native-vector-icons": "^4.6.0",
"react-navigation": "^2.2.0",
"react-redux": "^5.0.7",
"react-timer-mixin": "^0.13.4",
"redux": "^4.0.0",
"tcomb-form-native": "git+https://github.com/conbag/tcomb-form-native.git#app-version",
"victory-native": "^30.1.0"
and this line appears to be the line causing the issue:
FileSystem.downloadAsync(Asset.fromModule(require('../Database/caatch.db')).uri, file)
Expected Results: I should be able to run the app at SDK 31.0.0
Actual Results: Upon upgrading to 31.0.0 I get the error listed above