Publishing in Expo, dependancy hell - expo

I am getting these two errors in my Expo IDE:
Warning: You are using npm version 5.6.0. There may be bugs in this version, use it at your own risk. We recommend version 4.6.1.
Warning: Expo version in package.json does not match sdkVersion in manifest.
Warning: 'react' peer dependency missing. Run npm ls in C:\users\matt\sites\rg-calendar to see full warning.
If there is an issue running your project, please run npm install in C:\users\matt\sites\rg-calendar and restart.
Whn I run npm ls I have a load of missing packages, I the run npm install but I just get unmet dependancy errors.
My app.json file is:
{
"expo": {
"name": "RGUC",
"icon": "./img/calendarIcon.png",
"version": "1.0.0",
"slug": "rguc-calendar",
"sdkVersion": "21.0.0",
"ios": {
"bundleIdentifier": "com.rguc.calendar"
},
"android": {
"package": "com.rguc.calendar"
}
}
}
I have the same react-native version in my package.json:
{
"name": "rgcalendar",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-eslint": "^8.2.2",
"eslint": "^4.18.2",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"flow-bin": "^0.69.0",
"jest-expo": "21.0.0",
"react-native-scripts": "1.8.1",
"react-test-renderer": "16.0.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": "node node_modules/jest/bin/jest.js --watch",
"lint": "eslint --fix *.js",
"flow": "flow"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^21.0.0",
"react": "16.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-21.0.2.tar.gz",
"react-native-calendars": "^1.16.1",
"react-native-fontawesome": "^5.7.0",
"react-native-vector-icons": "^4.5.0",
"react-navigation": "^1.0.3",
"react-navigation-redux-helpers": "^1.0.1",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0"
}
}
I am using NVM:
9.5.0
* 8.10.0 (Currently using 64-bit executable)
6.11.1
4.6.1
4.4.0
How can I publish my expo project?

For downgrading NPM use this command: npm install -g npm#4 it will install 4.6.1 (at this moment).
The current Expo version is 26. Expo 21 is based on react-native 0.48 and that on react 16.0.0 So maybe you have some modules which are not compatible with that versions anymore.
For the unmet dependencies try the following: remove (or move) the node_modules folder and run npm install again also try npm cache clean.
Maybe upgrading your react versions also solves the issues.
Finally for publishing, you could install the Expo XDE which makes it much easier. Of course first you must get rid of any compile errors (not the warnings) before beeing able to publish your Expo project.

With my experience, I can say that npm version 5.6.0 is buggy. Use npm 4.6.1, its fully stable. You can do it by npm uninstall npm#5.6.0 && npm install npm#4.6.1. After that, do npm -v to see if 4.6.1 is displayed or its still 5.6.0. If this works, you will see 4.6.1 instead of 5.6.0. Let me know if this fixes your issue.
For publishing your Expo project, simply follow the steps from this link as it is -> https://docs.expo.io/versions/v19.0.0/workflow/building-standalone-apps

Related

How to solve npm errors like below in react

I'm new at react.js. Currently i'm trying to explore about react.js but after install creact-react-app using npm or yarn .Then wrote npm start but Still facing Invalid options object and npm ERR! code ELIFECYCLE too .
$ npm start
> random-users#0.1.0 start C:\Users\0x702!\Desktop\Today\New folder\random-users
> react-scripts start
Invalid options object. React Refresh Plugin has been initialized using an options object that does not match the API schema.
- options.overlay.module: The provided value "C:\\Users\\0x702!\\Desktop\\Today\\New folder\\random-users\\node_modules\\react-dev-utils\\refreshOverlayInterop.js" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! random-users#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the random-users#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\0x702!\AppData\Roaming\npm-cache\_logs\2021-01-14T15_40_45_603Z-debug.log
When i wrote yarn start the program shows me an error like below:
$ yarn start
yarn run v1.22.5
$ react-scripts start
Invalid options object. React Refresh Plugin has been initialized using an options object that does not match
the API schema.
- options.overlay.module: The provided value "C:\\Users\\0x702!\\Desktop\\Today\\New folder\\random-users\\n
ode_modules\\react-dev-utils\\refreshOverlayInterop.js" contains exclamation mark (!) which is not allowed be
cause it's reserved for loader syntax.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
package.json file
{
"name": "random-users",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
**Please guy's help me. I'm tried to solve this problem . **
First of all, its time to learn how to read errors ;)
Path contains exclamation mark, which is for loader syntax and cannot be used in that way.
Just rename C:\Users\0x702! folder to 0x702 or create another user to solve your problem :)

Baqend boilerplate fails to npm run build

I'm testing out the Baqend boilerplate downloaded from https://www.baqend.com/guide/starter-kits/react/ and when do npm run build, it throws this error:
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/baqend/lib/util/Metadata.js:12
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-redux-starter#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-redux-starter#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Hopefully I'm just using an older version of the SDK?
This works great on localhost!
The package file:
{
"name": "Nurse Uber Web",
"version": "0.1.0",
"private": true,
"dependencies": {
"baqend": "^2.8.6",
"lodash": "^4.17.4",
"prop-types": "^15.5.9",
"react": "^15.6.1",
"react-bootstrap": "^0.31.3",
"react-dom": "^15.6.1",
"react-redux": "^5.0.6",
"react-router": "^4.1.2",
"react-router-dom": "^4.1.2",
"redux": "^3.7.2",
"redux-baqend": "^1.0.4",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"react-scripts": "^1.0.11"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom"
}
}
according to this link it's considered bad practice to import a libraries sources directly. You can avoid this problem by simply importing the compiled version. Just change import { db } from 'baqend/lib/baqend' to import { db } from 'baqend' in all your application sources (store.js and Messages.js in the starter) and it should work. Thank you for pointing this out.

Downgrade Ionic Framework Version: 2.0.0-rc.3 to beta

I am using Ionic 2, and would like to downgrade the Ionic Framework Version: 2.0.0-rc.3 to the beta version.
ionic info
Your system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.0.0-beta.31
Ionic App Lib Version: 2.0.0-beta.17
OS:
Node Version: v6.2.2
I have tried the following:
npm uninstall -g ionic
npm install -g ionic#2.0.0-beta.31
But as you can see, all this did was downgrade the Ionic CLI Version.
Question
How do I downgrade the Ionic Framework Version?
Any help appreciated.
UPDATE
My package.json has the folliwng:
"ionic-angular": "^2.0.0-rc.3",
Do I need to change this to:
"ionic-angular": "^2.0.0-beta.31",
Then do I run something to make the change take affect?
UPDATE
I tried deleting node_modules (from ...\AppData\Roaming\npm), but now I get:
npm install
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.15
npm WARN #angular/core#2.2.4 requires a peer of rxjs#5.0.0-beta.12 but none was installed.
npm WARN #angular/core#2.2.4 requires a peer of zone.js#^0.6.21 but none was installed.
npm WARN #angular/http#2.2.4 requires a peer of rxjs#5.0.0-beta.12 but none was installed.
npm WARN #angular/platform-browser#2.2.4 requires a peer of #angular/common#2.2.4 but none was installed.
npm WARN #angular/platform-browser-dynamic#2.2.4 requires a peer of #angular/common#2.2.4 but none was installed.
npm WARN #ionic/cloud-angular#0.4.0 requires a peer of #angular/core#>=2.0.0-rc.0 <2.0.0-rc.5 but none was installed.
npm WARN accounts-phone#0.0.1 requires a peer of meteor-client-side#~0.2.3 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/common#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/compiler#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/compiler-cli#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/core#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/forms#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/http#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/platform-browser#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/platform-browser-dynamic#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of #angular/platform-server#2.1.1 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of rxjs#5.0.0-beta.12 but none was installed.
npm WARN ionic-angular#2.0.0-rc.3 requires a peer of zone.js#~0.6.26 but none was installed.
npm WARN theWhoZoo# No repository field.
npm WARN theWhoZoo# No license field.
There is no node_modules folder now.
you can use this package.json for beta11 , i used this one to downgrade
{
"dependencies": {
"#angular/common": "2.0.0-rc.4",
"#angular/compiler": "2.0.0-rc.4",
"#angular/core": "2.0.0-rc.4",
"#angular/platform-browser": "2.0.0-rc.4",
"#angular/platform-browser-dynamic": "2.0.0-rc.4",
"#angular/http": "2.0.0-rc.4",
"#angular/forms": "0.2.0",
"es6-shim": "0.35.1",
"ionic-angular": "2.0.0-beta.11",
"ionic-native": "1.3.17",
"ionicons": "3.0.0",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.6",
"zone.js": "0.6.12"
},
"devDependencies": {
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-watch": "4.3.5",
"ionic-gulp-browserify-typescript": "2.0.0",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^2.0.0",
"ionic-gulp-tslint": "^1.0.0",
"tslint-ionic-rules": "0.0.4",
"run-sequence": "1.1.5"
},
"name": "hhbuyer",
"description": "hhbuyer: An Ionic project",
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": []
}

Why do I get UNMET PEER DEPENDENCY when I install karma and gulp-karma?

Following this tutorial I would like to use karma for testing. When I install karma and gulp-karma I get the error message below. It says karma#1.3.0 is not installed which is needed for gulp-karma. When I install karma it says the same.
Now, I can't decide whether it is installed correctly or not.
I have tried to remove node_modules directory, clearing chache, upgrading npm and start it from scratch, the result is the same.
npm version: 3.10.8
package.json:
{
"name": "ui.spa",
"version": "1.0.0",
"description": "Framework module for Digital Library",
"main": "Gulpfile.js",
"dependencies": {
"bower": "^1.7.9",
"gulp": "^3.9.1",
"gulp-clean": "^0.3.2",
"gulp-inject": "^4.1.0",
"gulp-karma": "0.0.5",
"gulp-typescript": "^2.14.1",
"gulp-util": "^3.0.7",
"jasmine": "^2.5.2",
"jasmine-core": "^2.5.2",
"karma": "^1.3.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.2",
"merge-stream": "^1.0.0",
"phantomjs": "^2.1.7",
"require-dir": "^0.3.0",
"run-sequence": "^1.2.2",
"stream-series": "^0.1.1",
"typings": "^1.4.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
C:\Projects\sayusiando.visualstudio.com_git\DigitalLibrary\src\Framework\Framework.UI.Spa>npm
install karma --save ui.spa#1.0.0
C:\Projects\sayusiando.visualstudio.com_git\DigitalLibrary\src\Framework\Framework.UI.Spa
`-- UNMET PEER DEPENDENCY karma#1.3.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0
(node_modules\chokidar\node_modules\fsevents): npm WARN notsup
SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents#1.0.14: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"}) npm WARN gulp-karma#0.0.5 requires a peer
of karma#>=0.10 <=0.13 but none was installed. npm WARN ui.spa#1.0.0
No repository field. npm ERR! code 1
C:\Projects\sayusiando.visualstudio.com_git\DigitalLibrary\src\Framework\Framework.UI.Spa>npm
install gulp-karma --save ui.spa#1.0.0
C:\Projects\sayusiando.visualstudio.com_git\DigitalLibrary\src\Framework\Framework.UI.Spa
+-- gulp-karma#0.0.5 `-- UNMET PEER DEPENDENCY karma#1.3.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0
(node_modules\chokidar\node_modules\fsevents): npm WARN notsup
SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents#1.0.14: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"}) npm WARN gulp-karma#0.0.5 requires a peer
of karma#>=0.10 <=0.13 but none was installed. npm WARN ui.spa#1.0.0
No repository field.
C:\Projects\sayusiando.visualstudio.com_git\DigitalLibrary\src\Framework\Framework.UI.Spa>
The root of the problem is that gulp-karma package is deprecated now.

Ember: new project contains old dependencies

Environment
Mac OS X 10.10.5
NodeJS 4.2.4
Globally installed NPM Packages:
npm list -g --depth=0
/usr/local/lib
├── bower#1.7.2
├── ember-cli#1.13.13
└── npm#3.5.3
Create new Ember project:
ember new super-rentals
bower.json
{
"name": "super-rentals",
"dependencies": {
"ember": "1.13.11",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "0.2.1",
"ember-data": "1.13.15",
"ember-load-initializers": "0.1.7",
"ember-qunit": "0.4.16",
"ember-qunit-notifications": "0.1.0",
"ember-resolver": "~0.1.20",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.4.0",
"qunit": "~1.20.0"
}
}
Question
why did Ember create a bower.json file containing old dependencies? For example, today the latest Ember version is 2.2.0. Ember installed version 1.13.11.
The latest stable version of ember-cli is 1.13.13, which points to the latest Ember 1.13.x as part of the plan of "lockstep versioning". Unfortunately, ember-cli 2.x has been delayed, and is still in beta. So you have two choices:
Use ember-cli 2.2beta3, which will install the latest dependencies or,
Use ember-cli 1.13.13, and manually update the dependencies by editing bower.json and package.json.
Update: ember-cli 2.3.0 final has been released. Use that.