How can I resolve this issue. I am getting this error after I upgraded my expo application on my phone:
Error: Problem validating fields in app.json. See https://docs.expo.io/workflow/configuration/
• should NOT have additional property 'nodeModulesPath'.
Yes, I faced the same issue.
So I upgraded the expo-cli using
npm install -g expo-cli
My expo-cli version is 4.4.4 and I can't see the error anymore.
Thank you, Sardorek Aminjonov
#Sardorek, ran into the same problem, spent more than an hour, and finally figured it out.
The solution is to add the Expo SDK version in the app.json file. My version is 40.0.1. You can see it in package.json.
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz"
Upgrading to version 40 has removed it from the app.json file.
Now, add the major.minor.0 version in the app.json file like:
"sdkVersion": "40.0.0"
Looks like you cannot include the maintenance version number. If you do, you will get this error.
Error: Invalid sdkVersion. Valid options are 7.0.0, 8.0.0, 9.0.0, 10.0.0, 11.0.0, 12.0.0, 13.0.0, 14.0.0, 15.0.0, 16.0.0, 17.0.0, 18.0.0, 19.0.0, 20.0.0, 21.0.0, 22.0.0, 23.0.0, 24.0.0, 25.0.0, 26.0.0, 27.0.0, 28.0.0, 29.0.0, 30.0.0, 31.0.0, 32.0.0, 33.0.0, 34.0.0, 35.0.0, 36.0.0, 37.0.0, 38.0.0, 39.0.0, 40.0.0, 41.0.0
Couldn't publish because errors were found. (See logs above.) Please fix the errors and try again.
Now, run expo start, and voila it works! Hope this helps.
I am using 'yarn start' to launch expo. It looked like libragopi's solution fixed my issue, but after doing a hot refresh the warning was back. I found another possible solution, which may be related to the way you're launching expo (as in my case with yarn)
yarn global add expo-cli
from this forum post https://forums.expo.io/t/having-issue-with-app-json-after-upgrading-expo-app-in-android/51194/4
I landed on the same issue on a different context.
I am releasing my app with expo-github-action.
My problem was during the build expo publish --clear --release-channel staging
[08:52:02] - Expo SDK: 41.0.0
[08:52:02] - Release channel: staging
[08:52:02] - Workflow: Managed
[08:52:03] Building optimized bundles and generating sourcemaps...
[08:52:03] Error: Problem validating fields in app.json. See https://docs.expo.io/workflow/configuration/
[08:52:03] • should NOT have additional property 'nodeModulesPath'.
Solved with updating node-version
// .github/workflows/staging.yml
...
steps:
- uses: actions/checkout#v2
- uses: actions/setup-node#v1
with:
node-version: 14.x <------- update here
- uses: expo/expo-github-action#v5
with:
expo-version: 4.x <------- update here
expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
expo-cache: true
For Expo SDK42 is not needed to add "sdkVersion": "42.0.0", it's deprecated and will not work.
The solution is to update expo-cli to version 4.9.0 - npm i expo-cli#4.9.0
NOTE: be careful because with v4.9.1 it still appears :/
Error? its an expo related breakage
solution? simply go to your app.json file, add an expo property like so
{
"expo":{
"appKey":"NodeModulesPath",
},
"name": "NodeModulesPath",
}
ps: you can replace the "nodeModulesPath" with your particular property that is throwing the error
I had that problem so I updated the expo go (the app to run the application) and it fixed
Related
So I am currently trying to learn React and code on Visual Studio. Now, I am getting errors saying:
Oops, it looks like we couldn't activate the Expo manifest tools: Unable to perform cache refresh for C:\Users\Jasun\AppData\Local\Expo\schema-43.0.0.json: Error: certificate has expired.
Does anyone have any ideas?
Current versions are:
git version 2.34.1.windows.1
node version 17.2.0
expo version 5.0.0
Visual Studio Version 1.63.0
yarn version 1.22.17
reinstall doesn't help for now...
here is the workaround before they fix the issue - "Certificate has expired" when activating the Expo schema
You may try the workaround derived from the issue description
> expo init temp-proj --template expo-template-blank#44
> cd temp-proj
> expo doctor
Once expo doctor executed, the schema-44.0.0.json appear in %AppData%\Local\Expo\schema-44.0.0.json
then you can delete the temp-proj...
Warning: Problem validating app.json: Unable to perform cache refresh for ***C:\Users\Admin\AppData\Local\Expo***schema-44.0.0.json: Error: connect ETIMEDOUT 34.132.55.135:443.
Find schema-xx-x-x.json in C:\Users\Admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\caches
or search with everything app in your PC
Paste on C:\Users\Admin\AppData\Local\Expo\
Tadaaa Work
updating your expo cli will fix the issue
npm install -g expo-cli
then check the new version
expo --version
OR
use this link description
I had the same issue. The problem occurs because the file schema-43.0.0.json is missing from the directory.
I fixed it by copying one of the other schemas and renaming it to the missing one.
I have a freshly cloned repo created from the create-react-app template. I npm install to install the packages and then npm start to serve the files on localhost:3000. My coworker (the repo creator) is not having any issues.
However, I see the page flash for a second and then I get the following error:
Failed to compile
createRequire is not a function
Referenced from: BaseConfig
The error message doesn't provide any other information to help trace which file it could be coming from.
I've tried the following to troubleshoot:
Deleting node_modules and package-lock.json and re-installing
Deleting the entire repo and re-cloning
Searching for 'createRequire' or 'BaseConfig' in project files found no results
Searching online for similar issues. None seem to have the same error I'm encountering.
Other details:
npm version 6.14.8
react version 17.0.1
Any idea where this error could be coming from or what steps I can do to trace it?
TL;DR Needed to upgrade node version
I tried npx create-react-app to confirm if the issue was with the template or with the project code. While doing that, I got a message that my package dependencies required a higher version of node (I was on v.10.4, the latest is v15.2.0).
Doing brew upgrade installed the latest version but didn't change the default node version across the system (ie: node -v still showed v10.4) but
doing nvm install --lts then nvm alias-default [latest-version] fixed my issue!
Some solutions are not worked for me. I uninstalled node.js and installed latest version. It worked!
It could be connected with eslint in create-react-app
try to reinstall 'eslint' or 'eslint-config-react-app'
https://github.com/AtomLinter/linter-eslint/issues/1351
BaseConfig is a variable of the create-react-app react-scripts module
in node_modules/react-scripts/config/webpack.config.js
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: __dirname,
// #remove-on-eject-begin
ignore: isExtendingEslintConfig,
baseConfig: isExtendingEslintConfig
? undefined
: {
extends: [require.resolve('eslint-config-react-app')],
For me, downgrade the react-scripts to latest 3.x version solved my problem. I could not update the NodeJS version, as I didn't have access to NodeJS server instance. Seems it fits better with React 16.x.
I'm running and building the app at NodeJS V10.0.0.
I am a noob, but I just came across this very same error message in picking up where I previously had left off following a MERN stack tutorial. During the break, I must have switched nvm versions, and thanks to this thread I was able to correct this. From the terminal, I simply ran nvm list. From the result, I could see that I was running an older version (10.9.0) but had a newer one (10.12.0) available to me, which I switched to by running nvm use 10.12.0. This resolved my issue.
I'm getting a React Native version mismatch.
JavaScript version: 0.51.0
Native version: 0.52.0
I know there are others who have posted similar online but I simply don't understand what I need to do to resolve it, and as I'm supposed to avoid asking for help in other posts I am starting a new one!
I've closed Terminals and run build again as suggested elsewhere, considered changing Expo versions but unsure if I need to, and how. Anyone got a simply-to-explain solution?
Which version of what do I need to change?
Thanks
The issue of mismatch is related to the changing of your react-native version without properly updating peer dependencies and native projects.
If your project is using Expo, try following the upgrade guidelines here offered from Facebook.
Upgrading to new React Native versions
Found under.. "Create React Native App projects"
The document reference in will give you working mappings.
Once updated, run in your project root.
npm prune && npm install
# OR
yarn
Afterward start your app with your cache cleared.
npm start --reset-cache
# or
yarn start --reset-cache
I am coding with React Native. I don't see that when I first create react-native app for check running. When I implements my code see that. My purpose is generate apk.
app.json
build.gradle
index.js (index.android.json)
App package.json
Solved
Result: I solved my problem with npm install. I would like say many month after.
If anyone's getting this error after upgrading Expo, try restarting your simulator - that fixed it for me.
Here is my experience if someone using expo sees those error message.
I accidentally installed expo manually in my project which was version 29.0.0.
I was using version 28.0.0 of expo sdk, so it may have crashed inside.
What I did:
manually upgrade sdkVersion of app.json to 29.0.0.
change sdk version to 29.0.0 for react-native.
Had exactly the same error - fresh machine, fresh npm, only one version of expo installed.
Turns out, expo requires you to build it as an app before it can send it to the expo app properly (at least on Android). This is easiest done by:
Adding an "android" section to app.json, with the contents "package": "uk.co.yourcompany.yourpackagename" (this is required by android packages. It can be complete garbage, but should follow that format - a backwards domain name)
running expo build:android and following the instructions to sign up to expo's servers and build the app
then restarting expo start
Not sure if this is documented anywhere though, so may be a new thing?
Another thing to try is to move your node_modules folder away (or maybe delete it, up to you) and re-run npm install
According to the official tutorial: https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html
If you want to use expo in your application, you must create it in the following way
npm i -g create-react-native-app
create-react-native-app my-project
cd my-project
npm start
This will start the React Native packager and print a QR code. Open it in the Expo app to load your JavaScript.
as I see your code has files that are not necessary, such as build.gradle and index.js, the structure that create-react-native-app creates is different and easier to use
I was getting the same error after updating the expo-cli to version 3.0.6.
By looking at my package.json I noticed the expo-cli version installed on my computer is not the same as package.json. so I changed it to "expo-cli": "^3.0.6" and ran npm install || yarn, then the error disappeared!
React v 15.4.0 was released this morning and seems to have included a change that broke react-tap-event-plugin v1.0.0 producing this error:
$ npm build
> myProject#0.1.47 build /.../myProject
> node scripts/build.js
Creating an optimized production build...
Failed to create a production build. Reason:
Module not found: Error: Cannot resolve module 'react/lib/EventPluginHub' in /.../myProject/node_modules/react-tap-event-plugin/src
(note: I cleaned up the output a little)
According to THIS react-tap-event issue log version 2.0.0 of react-tap-event fixes the build problem. However, material-ui is still using react-tap-event version 1.0.0. What are the options here? The only options I can think of are:
Downgrade react and other packages as described in the link above
Wait for Material-UI to upgrade to react-tap-event 2.0.0
Any other solutions here? I'm pretty much dead in the water if I wanted to use react 15.4.0, as far as I can tell.
Almost make sure you update the react-tap-event-plugin to the right version of react.
material-ui version 0.16.3 is released to address the problem.
I had the same problem. I resolved it by going through next steps:
- delete `"react": "{your-version}"` line from package.json;
- delete node_modules dir;
- run `npm i`;
- run `npm i react --save`.
in React 16.4 removes a lot of internals (#121) this plugin depends on and will break the plugin.
https://www.npmjs.com/package/react-tap-event-plugin
as solution with new release of React uninstall thia plugin and deleted any imports and uses from source Reaction Commerce: TypeError: require(...).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED is undefined
and
Is react-tap-event-plugin still needed in 2018?
i removed react-tap-event-plugin from my reactjs project. it work for me