Build React-Native - react-native

I have this problem when trying to install some items
example:yarn add react-navigation;
warning " > react-native-paper#3.10.1" has unmet peer dependency "react-native-vector-
icons#*".
[5/5] πŸ”¨ Building fresh packages...
[-/9] ⠈ waiting...
[6/9] ⠈ lib-jitsi-meet
[7/9] ⠁ node-sass
[8/9] ⠁ ejs
error /node_modules/lib-jitsi-meet: Command failed.
Exit code: 127
Command: webpack -p
Arguments:

As suggested in error you have to install react-native-vector-icons, which is the dependency of the react-native-paper. So go first install react-native-vector-icon and then try to install another package. Here is the documentation of how to install react-native-vector-icon.

Related

I get 'Error: Please use yarn to install dependencies' when I do docker-compose up. I have already installed yarn on windows. But then why this error?

[4/4] Building fresh packages...
error /src/node_modules/#chainlink/contracts: Command failed.
Exit code: 1
Command: node -e "if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use yarn to install dependencies\n\n')"
Arguments:
Directory: /src/node_modules/#chainlink/contracts
Output:
[eval]:1
if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use yarn to install dependencies\n\n')
^
Error: Please use yarn to install dependencies
at [eval]:1:59
at Script.runInThisContext (node:vm:129:12)
at Object.runInThisContext (node:vm:313:38)
at node:internal/process/execution:76:19
at [eval]-wrapper:6:22
at evalScript (node:internal/process/execution:75:60)
at node:internal/main/eval_string:27:3
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
This is the error I am getting. I got this error 'Error: Please use yarn to install dependencies' when I do docker-compose up. I have already installed yarn on windows. But then why this error?

ENOSYS: function not implemented

I recently install next js use to npm in raspi 4 with the raspbian operating system. Every time when I install react js, next js, and gatsby show me the same error.
At this time I install nextjs use yarn. also, I use npm and npx to show the same error. so I started to find a solution then somebody told me to use sudo so I use sudo but doesn't work
sudo yarn create next-app
check my code error output
pi#raspberrypi:/media/pi/8243-BE00/next $ sudo yarn create next-app
yarn create v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-next-app#10.0.5" with binaries:
- create-next-app
βœ” What is your project named? … myapp
Creating a new Next.js app in /media/pi/8243-BE00/next/myapp.
Installing react, react-dom, and next using yarn...
yarn add v1.22.10
info No lockfile found.
[1/4] Resolving packages...
warning next > chokidar > fsevents#2.1.3: "Please update to latest v2.3 or v2.2"
warning next > webpack > watchpack > watchpack-chokidar2 > chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning next > webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning next > resolve-url-loader > rework > css > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
warning next > resolve-url-loader > rework > css > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
warning next > resolve-url-loader > rework > css > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
[2/4] Fetching packages...
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.3.1: The platform "linux" is incompatible with this module.
info "fsevents#2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "ENOSYS: function not implemented, symlink '../../../../terser/bin/terser' -> '/media/pi/8243-BE00/next/myapp/node_modules/#ampproject/toolbox-optimizer/node_modules/.bin/terser'".
info If you think this is a bug, please open a bug report with the information provided in "/media/pi/8243-BE00/next/myapp/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom next --cwd /media/pi/8243-BE00/next/myapp has failed.
Done in 293.09s.
pi#raspberrypi:/media/pi/8243-BE00/next $
You can try this next:
Remove yarn.lock.
Remove node_modules.
Use the --ignore-optional FLAG (yarn --ignore-optional); these don’t install optional dependencies.
The fsevents package is for macOS only; you don't need it in Linux.
If any of that works you can remove ignore and see if .yarnclean works.
Based on the log, looks like script is not able to create symbolic link
"ENOSYS: function not implemented, symlink '../../../../terser/bin/terser' -> '/media/pi/8243-BE00/next/myapp/node_modules/#ampproject/toolbox-optimizer/node_modules/.bin/terser'".
What is the file system you are using? I know exFAT and FAT32 don't support symbolic link.
Reference: https://learn.microsoft.com/en-us/windows/win32/fileio/filesystem-functionality-comparison

command yarn create react-app issues engine and module

I am trying to create-react-app with typescript as I have done many times to start a new project. It says I have a missing module so I updated my brew, updated yarn, updated node, I see the issue with the engine not compatible with the module but I am not sure how to update the engine either if It deletes everything
stephens-MacBook-Pro:MobX stephen$ yarn create react-app mobx_course --template typescript
yarn create v1.22.10
[1/4] πŸ” Resolving packages...
[2/4] 🚚 Fetching packages...
warning Pattern ["object-assign#latest"] is trying to unpack in the same destination "/Users/stephen/Library/Caches/Yarn/v6/npm-object-assign-4.1.1-2109adc7965887cfc05cbbd442cac8bfbb360863-integrity/node_modules/object-assign" as pattern ["object-assign#^4.1.0","object-assign#^4"]. This could result in non-deterministic behavior, skipping.
[3/4] πŸ”— Linking dependencies...
[4/4] πŸ”¨ Building fresh packages...
success Installed "create-react-app#4.0.1" with binaries:
- create-react-app
Creating a new React app in /Users/stephen/Desktop/MobX/mobx_course.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template-typescript...
yarn add v1.22.10
[1/4] πŸ” Resolving packages...
[2/4] 🚚 Fetching packages...
error browserslist#4.14.7: The engine "node" is incompatible with this module. Expected version "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7". Got "13.5.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template-typescript --cwd /Users/stephenbilham/Desktop/MobX/mobx_course has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting mobx_course/ from /Users/stephen/Desktop/MobX
Done.
error Command failed.
Exit code: 1
Command: /usr/local/bin/create-react-app
Arguments: mobx_course --template typescript
Directory: /Users/stephen/Desktop/MobX
Output:
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
stephens-MacBook-Pro:MobX stephen$
Can you try yarn create-react-app ...?
Notice the - between create and react.
I believe the convention is to always have it linked with hyphens, e.g.
create-react-app
create-next-app
create-strapi-app
To give the solution for this error: you need to make sure your node -v is up to date mine was 13.5 and not compatible anymore so I updated it to 14.5

How to update core-js to core-js#3 dependency?

While I was trying to install and setup react native, the precaution observed about the core-js version as update your core-js#... to core-js#3 But don't know how to update my core-js.
$ sudo react-native init AwesomeProject121
Password:
This will walk you through creating a new React Native project in /Users/amarnr1989/AwesomeProject121
Using yarn v1.13.0
Installing react-native...
yarn add v1.13.0
info No lockfile found.
[1/4] πŸ” Resolving packages...
warning react-native > create-react-class > fbjs > core-js#1.2.7: core-js#<2.6.5 is no longer maintained. Please, upgrade to core-js#3 or at least to actual version of core-js#2.
[2/4] 🚚 Fetching packages...
[----------------------------------------------------------------------------------------------------------------------------------------------------------] 0/601internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module '/Users/amarnr1989/AwesomeProject121/node_modules/react-native/package.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at checkNodeVersion (/usr/local/lib/node_modules/react-native-cli/index.js:306:21)
at run (/usr/local/lib/node_modules/react-native-cli/index.js:300:3)
at createProject (/usr/local/lib/node_modules/react-native-cli/index.js:249:3)
at init (/usr/local/lib/node_modules/react-native-cli/index.js:200:5)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:153:7)
at Module._compile (internal/modules/cjs/loader.js:701:30)
Please Suggest
You update core-js with the following command:
npm install --save core-js#^3
If you read the React Docs you will find that the command is derived from when you need to upgrade React itself.
For npm
npm install --save core-js#^3
for yarn
yarn add core-js#^3
For ng9 upgraders:
npm i -g core-js#^3
..then:
npm cache clean -f
..followed by:
npm i
How about reinstalling the node module? Go to the root directory of the project and remove the current node modules and install again.
These are the commands : rm -rf node_modules npm install
OR
npm uninstall -g react-native-cli and
npm install -g react-native-cli
With this
npm install --save core-js#^3
you now get the error
"core-js#<3 is no longer maintained and not recommended for usage due to the number of
issues. Please, upgrade your dependencies to the actual version of core-js#3"
so you might want to instead try
npm install --save core-js#3
if you're reading this post June 9 2020.
Install
npm i core-js
Modular standard library for JavaScript. Includes polyfills for ECMAScript up to 2019: promises, symbols, collections, iterators, typed arrays, many other features, ECMAScript proposals, some cross-platform WHATWG / W3C features and proposals like URL. You can load only required features or use it without global namespace pollution.
Read: https://www.npmjs.com/package/core-js

Yarn Install Error: Arguments: -c ./node_modules/.bin/typings install

When trying to run yarn install I am getting:
Jasons-MacBook-Pro: jasonbiondo$ yarn install
yarn install v0.21.3
[1/4] :mag: Resolving packages...
[2/4] :truck: Fetching packages...
[3/4] :link: Linking dependencies...
[4/4] :page_with_curl: Building fresh packages...
[1/6] β ‚ aurelia-infinite-scroll
[2/6] β ‚ fsevents
[3/6] β ‚ gifsicle
[4/6] β ‚ mozjpeg
error /Users/jasonbiondo/Sites/mysite-app/node_modules/aurelia-infinite-scroll: Command failed.
Exit code: 127
Command: sh
Arguments: -c ./node_modules/.bin/typings install
Directory: /Users/jasonbiondo/Sites/mysite-app/node_modules/aurelia-infinite-scroll
Output:
sh: ./node_modules/.bin/typings: No such file or directory
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Note: This does not throw an error with npm install.
Here is a link to a gist of my package.json: https://gist.github.com/jasonbiondo/fac812526499c99e44c171645bee5533