React Native CLI version for Xcode 9.2 - xcode

I had followed the instructions on installing React Native from the official website.
After doing as instructed, when I run the code, I get a error and after some research I found out it is because I am still using a 2011 MAC BOOK PRO and the Xcode version I am using is Xcode 9.2 which is not really compatible with the current version of React Native.
I would like to use the old version of React Native. Which React Native version is compatible with Xcode 9.2 and which React Native CLI version should I be using?
I tried installing the old version using the CLI by:
react-native init Test --version 0.51
But I get the following error:
This will walk you through creating a new React Native project in
/Users/bliss/Documents/Coder/ReactNative/Test Using yarn v1.3.2
Installing 0.51... yarn add v1.3.2 info No lockfile found. [1/4] 🔍
Resolving packages... error An unexpected error occurred:
"https://registry.yarnpkg.com/0.51: Not found". info If you think this
is a bug, please open a bug report with the information provided in
"/Users/bliss/Documents/Coder/ReactNative/Test/yarn-error.log". info
Visit https://yarnpkg.com/en/docs/cli/add for documentation about this
command. { Error: Command failed: yarn add 0.51 --exact
at checkExecSyncError (child_process.js:629:11)
at execSync (child_process.js:666:13)
at run (/usr/local/lib/node_modules/react-native-cli/index.js:294:5)
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. (/usr/local/lib/node_modules/react-native-cli/index.js:153:7)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12) status: 1, signal: null, output: [ null, null, null ], pid: 6231,
stdout: null, stderr: null } Command yarn add 0.51 --exact failed.

The format you are giving in the version is in the wrong way.
As you can see in the docs it should be
react-native init AwesomeProject --version X.XX.X
Instead of 0.51 try 0.51.0.
You can also check this question where there is alot of answer and other ways of doing it.

Related

Unable to install Strapi - Cannot find module '../build/Release/sharp.node'

I'm unable to install strapi. When I run the quickstart, it gives an error about not being able to find "sharp".
I tried downgrading node - from 16.x.x to 14.18.1, and I get fewer warnings, but still threw the same error.
OS: Windows
Node: 14.18.1
NPM: 6.14.15
❯ npx create-strapi-app jeffsdata-cms --quickstart  401ms  user  
npx: installed 146 in 13.315s
Creating a quickstart project.
Creating a new Strapi application at C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms.
Creating files.
Dependencies installed successfully.
Your application was created at C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms.
Available commands in your project:
npm run develop
Start Strapi in watch mode.
npm run start
Start Strapi without watch mode.
npm run build
Build Strapi admin panel.
npm run strapi
Display all available commands.
You can start by doing:
cd C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms
npm run develop
> jeffsdata-cms#0.1.0 build
> strapi build "--no-optimization"
Building your admin UI with development configuration ...
√ Webpack
Compiled successfully in 34.99s
Running your Strapi application.
> jeffsdata-cms#0.1.0 develop
> strapi develop
[2021-11-26T15:48:12.185Z] debug ⛔️ Server wasn't able to start properly.
[2021-11-26T15:48:12.186Z] error Error:
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp.node'
Require stack:
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\sharp\lib\constructor.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\sharp\lib\index.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\strapi-plugin-upload\services\image-manipulation.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\strapi\lib\load\load-files.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\strapi\lib\core\load-apis.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\strapi\lib\core\load-modules.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\strapi\lib\Strapi.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\strapi\lib\index.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\strapi\lib\commands\develop.js
- C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\strapi\bin\strapi.js
- Remove the "node_modules/sharp" directory then run
"npm install --ignore-scripts=false --verbose sharp" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/install
- Search for this error at https://github.com/lovell/sharp/issues
at Object.<anonymous> (C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\sharp\lib\constructor.js:32:9)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\node_modules\sharp\lib\index.js:3:15)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
I tried to delete the sharp folder and reinstall while on node 16, but that didn't fix this issue.
I tried to reinstall sharp on 14.18.1, but got a different error.
Downgrade node to 14.18.1 (windows: control panel, remove node, then download 14.18.1 (or whatever the most recent one, if it upgrades) from here).
Run the quickstart command npx create-strapi-app jeffsdata-cms --quickstart
Still throws the error complaining about sharp.
Delete the npm_modules/sharp folder
Reinstall sharp with npm install --ignore-scripts=false --verbose sharp.
Confirm it's working with node run develop.
This didn't fix the issue for me - now it just throws another error:
❯ node run develop  1m 34.989s  user  
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'C:\Users\user\source\repos\jeffsdata-strapi\jeffsdata-cms\run'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I next tried to roll back to Node 16 and use the beta...
Uninstall Node 14
Install Node 16
Install strapi beta - npm install strapi#beta -g
Create new project: strapi new jeffsdata-cms --quickstart
Now I get this error...
❯ strapi develop
 4.469s  user  
[2021-11-26T16:58:19.646Z] error The client `sqlite3` is not installed.
[2021-11-26T16:58:19.647Z] error You can install it with `$ npm install sqlite3 --save`.
So, I obviously install sqlite3 - npm install sqlite3 --save, but it doesn't change the error.
So, I try running strapi build, then strapi develop... Same error - "The client sqlite3 is not installed."

Cannot run addon after installation of web-ext on ubuntu 16.04 nodejs v4.2.6 npm 3.5.2

when installing web-ext i got this two messages in the and of installation:
npm WARN optional Skipping failed optional dependency /web-ext/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.2.4
after trying to start addon with web-ext run i get this messages
TypeError: Cannot read property 'R_OK' of undefined
at fileIsReadable (/usr/local/lib/node_modules/web-ext/dist/webpack:/src/util/file-exists.js:24:42)
at _callee$ (/usr/local/lib/node_modules/web-ext/dist/webpack:/src/util/file-exists.js:28:11)
at tryCatch (/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:62:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:296:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next]
(/usr/local/lib/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:1)
at /usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:1
at new Promise (/usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/core-js/library/modules/es6.promise.js:177:1)
at /usr/local/lib/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:1
at fileExists (/usr/local/lib/node_modules/web-ext/dist/web-ext.js:13002:17)
Update to at least the latest v6 of node. I recommend you to use >= v8, because the support for v6 is ending in 2019 and you can't use async/await for example. (https://github.com/nodejs/Release#release-schedule)

composer rest server fails to start after upgrade to composer 0.19.6

docker logs -f rest shows the following
[2018-05-28 06:38:39] PM2 log: Launching in no daemon mode
[2018-05-28 06:38:39] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
[2018-05-28 06:38:39] PM2 log: App name:composer-rest-server id:0 online
{ Error: Cannot find module 'base64-js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/composer/node_modules/swagger-client/dist/index.js:7:11309)
at t (/home/composer/node_modules/swagger-client/dist/index.js:1:177)
at Object.<anonymous> (/home/composer/node_modules/swagger-client/dist/index.js:7:7)
at Object.<anonymous> (/home/composer/node_modules/swagger-client/dist/index.js:7:11111)
at t (/home/composer/node_modules/swagger-client/dist/index.js:1:177)
at Object.<anonymous> (/home/composer/node_modules/swagger-client/dist/index.js:1:48717)
at t (/home/composer/node_modules/swagger-client/dist/index.js:1:177)
at Object.<anonymous> (/home/composer/node_modules/swagger-client/dist/index.js:1:40420)
at t (/home/composer/node_modules/swagger-client/dist/index.js:1:177)
at Object.<anonymous> (/home/composer/node_modules/swagger-client/dist/index.js:1:16408)
at t (/home/composer/node_modules/swagger-client/dist/index.js:1:177)
at Object.<anonymous> (/home/composer/node_modules/swagger-client/dist/index.js:1:15877) code: 'MODULE_NOT_FOUND' }
[2018-05-28 06:38:41] PM2 log: App [composer-rest-server] with id [0] and pid [14], exited with code [1] via signal [SIGINT]
I installed base64-js via npm but still get the same error
Following on from the previous answer and comments:
There has been a problem last week building the Docker Images for Composer, so the version with the "latest" tag is v0.19.5.
If you look at this page on Docker Hub you can see the problem:
https://hub.docker.com/r/hyperledger/composer-rest-server/tags/
As a temporary measure, if you run these 2 docker commands you should get a v0.19.6 version of the image that will be compatible with your v0.19.6 installed modules.
docker pull hyperledger/composer-rest-server:0.19.6-20180524041020
docker tag hyperledger/composer-rest-server:0.19.6-20180524041020 hyperledger/composer-rest-server:latest
I would suggest using docker rmi to remove any existing composer-rest-server images before using the commands above.
UPDATE After Later Comments - AND Appology
I'm sorry - I thought this would work and that these versions would be compatible.
To get compatibility now, you could re-install everything to v0.19.5 and use the 'trick' above to pull a composer-rest-server v0.19.5 and rename to latest (having removed the earlier one first)
or
you could uninstall composer and install the date specific version to be compatible with the container version. (you will need to restart fabric and re-deploy the network again.) e.g. npm install -g composer-cli#0.19.6-20180524041020
I have not tested this!
see https://github.com/hyperledger/composer/issues/4067
A bad swagger-client npm module was published 3 days ago which caused the problem. A new version of swagger-client 3.8.6 has now been published to fix the problem.

`ReferenceError: Meteor is not defined` in `meteor-client.js` Angular-Meteor Project

After an npm install which triggered meteor-client bundle during postinstall, I am receiving this new error in the browser console:
"ReferenceError: Meteor is not defined
at Object.eval (webpack-internal:///../../../../meteor-client.js:32502:3)
at eval (webpack-internal:///../../../../meteor-client.js:32507:30)
at Object.../../../../meteor-client.js (http://localhost:4200/vendor.bundle.js:1395:1)
at __webpack_require__ (http://localhost:4200/inline.bundle.js:55:30)
at eval (webpack-internal:///../../../../../clients/browser/main.ts:3:72)
at Object.../../../../../clients/browser/main.ts (http://localhost:4200/main.bundle.js:424:1)
at __webpack_require__ (http://localhost:4200/inline.bundle.js:55:30)
at Object.0 (http://localhost:4200/main.bundle.js:439:18)
at __webpack_require__ (http://localhost:4200/inline.bundle.js:55:30)
at webpackJsonpCallback (http://localhost:4200/inline.bundle.js:26:23)"
```
Triggered at:
if (Package.reload) {
Meteor._reload.onMigrate(function () {
return [false];
});
}
This behavior occurs with:
#angular/cli: both 1.6.3 & 1.6.6
meteor-client-bundler: 0.3.0
Meteor: both 1.6.0.1 & 1.6.1
I had the same issue, and downgrade as John mentioned worked for me.
If you are wondering how to downgrade your meteor app follow the instructions bellow that I've taken from how do I install a previous version of meteor JS?
1) Go to your project root folder
2) Run meteor update --release x.y.z
Where x.y.z is the desired version, for example 1.6.0
Might be related to this issue with a normal angular-meteor setup? It seems like the Meteor version 1.6.0.1 is crashing the meteor-angular setup. I was testing both project setups, with and without AngularCLI, and experienced exactly the errors described here and at angular-meteor issues.
However, resetting the project to Meteor 1.6 worked for me in both cases.

Ionic 3 Cannot find module "rxjs/operators/share"

I'm using Ionic 3 to build an mobile application and everything is working fine, but when I add #ngx-translate, I got this error and I didn't find any solution for this issues
ionic (Ionic CLI) : 3.12.0
Uncaught Error: Cannot find module "rxjs/operators/share"
at Object.<anonymous> (vendor.js:159023)
at Object.<anonymous> (core.es5.js:3855)
at __webpack_require__ (bootstrap 4cdf06f8badf4bef7b37:54)
at Object.397 (main.ts:5)
at __webpack_require__ (bootstrap 4cdf06f8badf4bef7b37:54)
at Object.392 (main.js:852)
at __webpack_require__ (bootstrap 4cdf06f8badf4bef7b37:54)
at webpackJsonpCallback (bootstrap 4cdf06f8badf4bef7b37:25)
at main.js:1
For me helps change the version of #ngx-translate/core to version: "7.2.2"
I've compare with working example of github repo of ngx-translate
https://github.com/ngx-translate/core/blob/master/examples/ionic/package.json
Change the version of #ngx-translate/core in you package.json
to "#ngx-translate/core": "7.2.2",
and run npm update
I faced the same problem just few days back. What you need to do is uninstall the current #ngx-translate/core which version 9.0.2 by running this command npm uninstall #ngx-translate/core --save this will remove the module and also update your package.json file. now install the module again and specify the version number like this npm install #ngx-translate/core#8.0.0 --save.
This is most likely caused by your rxjs version. Please update it to the latest stable version and you shouldn't see this issue anymore.

Resources