I am trying to run a local Dev build of Metamask Chrome Extension.
According to their README files Yarn3 should be installed and then to run React Dev Tools and Redux Dev Tools you to have install remotedev-server package with yarn global.
Yarn returns the following error - Usage Error: The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead
Using yarn dlx does not help it gives the following error (see image) my Terminal output logs
I have tried installing the classic yarn that has version 1.22.19 but MetaMask package.json file has locked the yarn version at 3.2.4.
Has anyone faced this issue. Am I missing something. I have tried following one github discussion about this but with no success.
whenever I run yarn start/ yarn install / or any sort of method relating yarn won't work.
however, npm does work. How do I fix this problem?
I've tried to downgrade the node.js version
but it won't work.
I think it's a permission issue. Try adding the "sudo" prefix to the command
I'm having this problem when trying to run react native app on ios emulator.
I literally just created the project running npx react-native init app_test and when I run npx react-native run-ios I got this error.
I'm not installing dependencies or pods or anything. Just running yarn start when the app init is done and trying to run the emulator. Any suggestion by any chance plz?
Error in console:
error: node_modules/react-native/Libraries/Image/ImageAnalyticsTagContext.js: Property body[6] of BlockStatement expected node to be of a type ["Statement"] but instead got "AssignmentExpression"
You may want to check this solution out: https://github.com/facebook/react-native/issues/31960#issuecomment-893176992.
It seems there is a problem with #babel/plugin-transform-react-display-name#7.15.0 which has been released along with #babel/core#7.15.0 a couple of hours ago.
You may want to resolve the warnings after running 'yarn' or 'npm install'.
One of the relevant warnings is
warning "react-native > react-native-codegen > jscodeshift#0.11.0" has unmet peer dependency "#babel/preset-env#^7.1.6".
I was able to resolve this issue by running:
yarn add #babel/preset-env#^7.1.6 -D
Edit: Spoke too soon. That did not resolve the issue.
I found a solution:
Download the #babel folder from here and replace the existing folder in node_modules and it works:
https://drive.google.com/file/d/1-z_4H_z4x075unZqZD41WYUwY_hsrKox/view
"resolutions": {
"#babel/plugin-transform-react-display-name": "7.14.5"
}
add this in your package.json, and use yarn
I figured it out, for people who are starting react-native as me, I'll explain what I did with detail. (I'm using Window10)
I did almost everything in StackOverflow to solve my problem. As you can see in many answers this problem is caused by babel.
I bet you download "yarn" while set up, you need to remove and re-download babel using yarn.
So, you need to put this below in your project root dir cmd
$ yarn remove babel-preset-react-native
$ yarn add babel-preset-react-native#2.1.0
But for me, this caused problem Bug: Yarn fails to install (Exit code: 128). So, I had to remove yarn and re-download using below
So I had to clean my cache to remove and re-downlaod yarn.lock using
$ yarn cache clean
$ del yarn.lock
(I didn't use this but maybe you need to erase node_modules file as well)
$ yarn
Then, I put below in my project's package.json below the "jest"
"resolutions": { "#babel/plugin-transform-react-display-name": "7.14.5" }
For last, run my project using below.
$ react-native run-android
Hope this work for you as well it did for me.
I've been stuck for quite a while. I'm currently starting a local environment for Prestashop and when I go into the _dev folder and run npm run build or npm run watch to watch my changes. I receive the error below. I've done rm -rf node_modules and reinstalled them, I have also tried uninstalling webpack and node-sass and reinstalling but still no luck. can somebody tell me where I am going wrong or what is causing this?
My tests run fine locally, but in CircleCI I get this error “Cannot find module ‘shared-data-model’” which is one of my Yarn workspaces.
The stack trace of the error points to Resolver.resolveModule (../node_modules/#jest/core/node_modules/jest-resolve/build/index.js:276:11)
I am running
Jest 25.1.0,
Yarn 1.22,
Node.js 12.16
Any ideas what could be causing this? Thank you
I figured out the problem. I am using typescript CLI tsc to transpile my module from /src to /dist, and I wasn't running the transpile step on CI to generate the /dist folder, so when it tried to find the entrypoint of the module dist/index.js there was nothing there. Once I ran the build tsc step in CI it worked as expected.