tfx extension create failed while running npm script - azure-devops-extensions

I'm using this package to compile and build my extension
{
"id": "extensionAzureDevOps",
"name": "extension",
"publisher": "ME",
"version": "0.0.63",
"description": "Azure DevOps Extension",
"keywords": [
"extensions",
"Azure DevOps",
"Visual Studio Team Services"
],
"engines": {
"vscode": "^1.8.0"
},
"license": "MIT",
"repository": {
"type": "git",
"url": ""
},
"scripts": {
"clean": "rimraf ./dist",
"compile": "npm run clean && npm run test && webpack --mode production",
"compile:dev": "npm run clean && npm run test && webpack --mode development",
"build": "npm run compile",
"build:dev": "npm run compile:dev && npm run postbuild",
"postbuild": "npm run package-extension -- --rev-version",
"package-extension": "tfx extension create --manifest-globs azure-devops-extension.json src/TabExtension/*.json",
"publish-extension": "tfx extension publish --manifest-globs azure-devops-extension.json src/TabExtension/*.json",
"test": "set TEST_REPORT_FILENAME=test-results.xml && jest --verbose"
},
"dependencies": {
"#fluentui/react": "^8.36.3",
"azure-devops-extension-api": "~1.157.0",
"azure-devops-extension-sdk": "~2.0.11",
"azure-devops-ui": "~2.164.0",
"react": "~16.13.1",
"react-dom": "~16.13.1"
},
"devDependencies": {
"#testing-library/jest-dom": "^5.11.0",
"#testing-library/react": "^10.4.4",
"#types/jest": "^26.0.3",
"#types/react": "~16.8.2",
"#types/react-dom": "~16.8.0",
"copy-webpack-plugin": "^7.0.0",
"base64-inline-loader": "~1.1.1",
"css-loader": "~1.0.0",
"jest": "^26.1.0",
"jest-junit-reporter": "^1.1.0",
"node-sass": "^5.0.0",
"rimraf": "~2.6.2",
"sass-loader": "~10.0.5",
"style-loader": "~0.23.1",
"tfx-cli": "^0.6.3",
"ts-jest": "^26.1.1",
"ts-loader": "~5.2.2",
"typescript": "^3.9.6",
"webpack": "^5.23.0",
"webpack-cli": "^4.5.0"
},
"jest": {
"transform": {
"^.+\\.(js|ts|tsx|jsx)$": "ts-jest"
},
"transformIgnorePatterns": [
"node_modules/(?!(react-native|azure-devops-ui|azure-devops-extension-sdk)/)"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/__mocks__/fileMock.js",
"\\.(css|less|scss)$": "<rootDir>/src/__mocks__/styleMock.js"
},
"preset": "ts-jest/presets/js-with-babel",
"testResultsProcessor": "./node_modules/jest-junit-reporter",
"collectCoverage": true,
"coverageReporters": [
"json",
"html",
"cobertura"
],
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.test.json"
}
}
}
}
When I run the command npm run postbuild, I receive this error:
tfx extension create --manifest-globs azure-devops-extension.json src/TabExtension/*.json "--rev-version"
tfx extension create --manifest-globs azure-devops-extension.json src/TabExtension/*.json "--rev-version"
(node:89172) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
TFS Cross Platform Command Line Interface v0.6.4
Copyright Microsoft Corporation
error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Inplace
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! feedback-extension-for-azuredevops#0.0.63 package-extension: `tfx extension create --manifest-globs azure-devops-extension.json src/TabExtension/*.json "--rev-version"`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the feedback-extension-for-azuredevops#0.0.63 package-extension 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\t-nashak\AppData\Roaming\npm-cache\_logs\2021-12-08T15_15_13_712Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! feedback-extension-for-azuredevops#0.0.63 postbuild: `npm run package-extension -- --rev-version`
npm ERR! Exit status 4294967295
npm ERR!
But when I run the command tfx extension create --manifest-globs azure-devops-extension.json src/TabExtension/*.json --rev-version it works well
what causes the dependencies cycle? how can I fix it?
note: if I remove the param --rev-version it will work well

I had the same issue. I guess the postbuild command is wrong:
"postbuild": "npm run package-extension -- --rev-version"
This works:
"postbuild": "npm run package-extension --rev-version"

Related

Cannot find module 'typescript/bin/tsc' when running tsc-watch

Getting "Cannot find module 'typescript/bin/tsc'" when I try to run tsc-watch
yarn tsc-watch --noClear -p tsconfig.json
yarn run v1.22.19
$ /Users/jason/Work/VDQ/VDQApp/node_modules/.bin/tsc-watch --noClear -p tsconfig.json
Cannot find module 'typescript/bin/tsc'
Require stack:
- /Users/jason/Work/VDQ/VDQApp/node_modules/tsc-watch/lib/tsc-watch.js
- /Users/jason/Work/VDQ/VDQApp/node_modules/tsc-watch/index.js
the error is reproducible simply without the JSBundling/package.json /Yarn setup
My package.json file is:
{
"name": "app",
"private": "true",
"dependencies": {
"#hotwired/stimulus": "^3.1.0",
"#hotwired/turbo-rails": "^7.2.0",
"#popperjs/core": "^2.11.6",
"bootstrap": "^5.2.2",
"bootstrap-icons": "^1.9.1",
"esbuild": "^0.15.10",
"sass": "^1.55.0",
"tsc": "^2.0.4"
},
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets",
"build:css": "sass ./app/assets/stylesheets/application.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules",
"failure:js": "rm ./app/assets/builds/application.js && rm ./app/assets/builds/application.js.map",
"compile:typescript": "tsc-watch --noClear -p tsconfig.json --onSuccess \"yarn build\" --onFailure \"yarn failure:js\""
},
"devDependencies": {
"tsc-watch": "^5.0.3"
}
}
my tsconfig.json file is:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true
}
}
This happens when you fail to globally add the typescript package using
Confusingly, the typescript command is invoked using tsc but the package name is typscript
TO FIX:
yarn add global typescript
or
npx install -g typescript

Getting Error: Cannot find module 'cypress-mochawesome-reporter/plugin' when i run cypress in docker

I have never used docker before. When I run it in my local it will be working fine but when I run using docker getting an error. I have created a docker file that contains the below line of code.
FROM cypress/base:14.19.0
RUN mkdir /legrande-cypress
WORKDIR /legrande-cypress
COPY ./package.json .
COPY ./cypress.json .
COPY ./cypress ./cypress
RUN npm install
ENTRYPOINT ["npx","cypress","run"]
This is my package.json file.
{
"name": "cypressautomation",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"delete:reportFolder": "rm -rf mochawesome-report/",
"test:cli": "npm run delete:reportFolder && cypress run",
"merge:reports": "mochawesome-merge mochawesome-report/*.json > cypress-combined-report.json",
"create:html:report": "npm run merge:reports && marge --reportDir TestReport cypress-combined-report.json",
"cy:run": "cypress run",
"record-test": "cypress run --record --key ############################"
},
"reporter": "cypress-mochawesome-reporter",
"reporterOptions": {
"reportDir": "cypress/Reports",
"charts": true,
"reportPageTitle": "My Test Suite",
"embeddedScreenshots": true,
"inlineAssets": true
},
"video": false,
"author": "weblylab",
"license": "ISC",
"devDependencies": {
"cypress": "^9.5.0",
"cypress-file-upload": "^5.0.2",
"cypress-mochawesome-reporter": "^2.2.0",
"cypress-slack-reporter": "^1.2.1",
"cypress-xpath": "^1.6.1",
"faker": "^5.5.3",
"i": "^0.3.6",
"mocha": "^8.4.0",
"mochawesome": "^6.2.2",
"mochawesome-merge": "^4.2.0",
"mochawesome-report-generator": "^5.2.0",
"tsconfig-paths": "^3.9.0"
},
"dependencies": {
"#auth0/auth0-spa-js": "^1.13.6",
"#types/bluebird": "^3.5.33",
"#types/lodash": "^4.14.168",
"chai": "^4.3.0",
"cypress-iframe": "^1.0.1",
"cypress-skip-test": "^1.0.0",
"delay": "^5.0.0",
"Faker": "^0.7.2",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"resolve-url": "^0.2.1",
"save": "^2.4.0",
"source-map-resolve": "^0.6.0",
"urix": "^0.1.0",
"xlsx": "^0.17.0"
}
}
When I run cypress test using docker run -i -v "%cd%":/legrande-cypress -t cypress-image:latest --spec cypress/integration/examples/*.js it will throwes an error below.
Your pluginsFile threw an error from: /legrande-cypress/cypress/plugins/index.js
Error: Cannot find module 'cypress-mochawesome-reporter/plugin'
Require stack:
- /legrande-cypress/cypress/plugins/index.js
- /root/.cache/Cypress/9.5.1/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js
- /root/.cache/Cypress/9.5.1/Cypress/resources/app/packages/server/lib/plugins/child/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at module.exports (/legrande-cypress/cypress/plugins/index.js:22:3)
at /root/.cache/Cypress/9.5.1/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:94:12
at tryCatcher (/root/.cache/Cypress/9.5.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
at Function.Promise.attempt.Promise.try (/root/.cache/Cypress/9.5.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/method.js:39:29)
at load (/root/.cache/Cypress/9.5.1/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:91:7)
at EventEmitter.<anonymous> (/root/.cache/Cypress/9.5.1/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:209:5)
at EventEmitter.emit (events.js:400:28)
at process.<anonymous> (/root/.cache/Cypress/9.5.1/Cypress/resources/app/packages/server/lib/plugins/util.js:19:22)
at process.emit (events.js:400:28)
at emit (internal/child_process.js:912:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
How to resolve this error please let me know if anyone has any idea.

Nativescript-Dev-Appium Setup

I am trying to implement nativescript-dev-appium in an existing nativescript-angular project and am having a lot of trouble getting the plugin configured.
The simulator appears to be found but the run fails in the before all and after all hooks because it appears to not have a device instance.
walrus:demo-appium niirds$ npm run e2e -- --runType sim.iPhoneX --verbose
> # e2e /Users/niirds/mobi/demo-appium
> node ./node_modules/nativescript-dev-appium/check-dev-deps.js && tsc -p e2e && mocha --opts ./e2e/config/mocha.opts "--runType" "sim.iPhoneX" "--verbose"
/Users/niirds/mobi/demo-appium/e2e/config/appium.capabilities.json
Capabilities found at: /Users/niirds/mobi/demo-appium/e2e/config/appium.capabilities.json
Appium will use default automation name
Available applications: ["platforms/ios/build/emulator/demoappium.app"]
Pick first application: "platforms/ios/build/emulator/demoappium.app"
Application full path: /Users/niirds/mobi/demo-appium/platforms/ios/build/emulator/demoappium.app
Found devices: [ { token: 'C8B1990E-1593-49A8-AA68-C7E5CC2134BB',
name: 'iPhone X',
status: 'booted',
type: 'watch',
apiLevel: '12.2',
platform: 'ios',
config: { density: 3, offsetPixels: 87 } } ]
1) "before all" hook: start server
2) "after all" hook: stop server
0 passing (2s)
2 failing
1) "before all" hook: start server:
TypeError: Cannot read property 'type' of undefined
at DeviceManager.<anonymous> (node_modules/nativescript-dev-appium/lib/device-manager.js:82:28)
at Generator.next (<anonymous>)
at fulfilled (node_modules/nativescript-dev-appium/lib/device-manager.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
2) "after all" hook: stop server:
TypeError: Cannot read property 'platform' of undefined
at Function.<anonymous> (node_modules/mobile-devices-controller/lib/device-controller.js:104:24)
at Generator.next (<anonymous>)
at /Users/niirds/mobi/demo-appium/node_modules/mobile-devices-controller/lib/device-controller.js:7:71
at new Promise (<anonymous>)
at __awaiter (node_modules/mobile-devices-controller/lib/device-controller.js:3:12)
at Function.uninstallApp (node_modules/mobile-devices-controller/lib/device-controller.js:103:16)
at Object.<anonymous> (node_modules/nativescript-dev-appium/index.js:85:64)
at Generator.next (<anonymous>)
at /Users/niirds/mobi/demo-appium/node_modules/nativescript-dev-appium/index.js:7:71
at new Promise (<anonymous>)
at __awaiter (node_modules/nativescript-dev-appium/index.js:3:12)
at Object.stopServer (node_modules/nativescript-dev-appium/index.js:77:12)
at Object.<anonymous> (e2e/setup.js:16:37)
at Generator.next (<anonymous>)
at /Users/niirds/mobi/demo-appium/e2e/setup.js:7:71
at new Promise (<anonymous>)
at __awaiter (e2e/setup.js:3:12)
at Context.after (e2e/setup.js:15:28)
at process.topLevelDomainCallback (domain.js:121:23)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # e2e: `node ./node_modules/nativescript-dev-appium/check-dev-deps.js && tsc -p e2e && mocha --opts ./e2e/config/mocha.opts "--runType" "sim.iPhoneX" "--verbose"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Here is the simulator capability, provided by the installation:
"sim.iPhoneX": {
"platformName": "iOS",
"platformVersion": "/12*/",
"deviceName": "iPhone X",
"noReset": false,
"fullReset": false,
"app": ""
},
I have xcode 10.2 installed, and here is the package.json if that helps.
{
"nativescript": {
"id": "org.nativescript.demoappium",
"tns-android": {
"version": "5.3.0"
},
"tns-ios": {
"version": "5.3.0"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"scripts": {
"lint": "tslint \"src/**/*.ts\"",
"e2e": "node ./node_modules/nativescript-dev-appium/check-dev-deps.js && tsc -p e2e && mocha --opts ./e2e/config/mocha.opts ",
"e2e-watch": "tsc -p e2e --watch"
},
"dependencies": {
"#angular/animations": "~7.2.0",
"#angular/common": "~7.2.0",
"#angular/compiler": "~7.2.0",
"#angular/core": "~7.2.0",
"#angular/forms": "~7.2.0",
"#angular/http": "~7.2.0",
"#angular/platform-browser": "~7.2.0",
"#angular/platform-browser-dynamic": "~7.2.0",
"#angular/router": "~7.2.0",
"nativescript-angular": "~7.2.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.12",
"rxjs": "~6.3.0",
"tns-core-modules": "~5.3.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"#angular/compiler-cli": "~7.2.0",
"#nativescript/schematics": "~0.5.0",
"#ngtools/webpack": "~7.2.0",
"#types/chai": "~4.1.7",
"#types/mocha": "~5.2.5",
"#types/node": "~10.12.18",
"codelyzer": "~4.5.0",
"mocha": "~5.2.0",
"mocha-junit-reporter": "~1.18.0",
"mocha-multi": "~1.0.1",
"nativescript-dev-appium": "^5.1.0",
"nativescript-dev-sass": "~1.7.0",
"nativescript-dev-typescript": "~0.9.0",
"nativescript-dev-webpack": "~0.21.0",
"tslint": "~5.11.0"
},
"gitHead": "6ccaee804c71761be1c2f91d0b2dd67c8ba6d2b6",
"readme": "NativeScript Application"
}
Steps to reproduce:
1. create sample nativescript-angular app--i used the tab navigation one for this test.
2. install nativescript-dev-appium: npm i -D nativescript-dev-appium
3. install other dependencies https://docs.nativescript.org/angular/tooling/testing/end-to-end-testing/overview#environment-setup
4. build app: tns build <platform>
5. run test: `npm run e2e -- --runType
i have been trying to get this to work on iOS for now.
Any help will be greatly appreciated!
I think that for some reason the device type that device controller has returned type: 'watch' is not correct.
I suggest you change the config to something like:
"sim.iPhoneX": {
"platformName": "iOS",
"platformVersion": "12.2",
"deviceName": "iPhone X",
"noReset": false,
"fullReset": false,
"app": ""
},
or simply try it with the --ignoreDeviceController option.

Can't add iOS platform to ionic app, Mac OS

I am trying to add iOS platform to my ionic 1 app but I get errors. How can I go further to build my app?
$ cordova platform add ios --save
Using cordova-fetch for cordova-ios#~4.3.1
(node:14587) UnhandledPromiseRejectionWarning: CordovaError: Failed to fetch platform cordova-ios#~4.3.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 254 Error output:
npm WARN #ionic-native/globalization#3.14.0 requires a peer of #ionic-native/core#^3.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/globalization#3.14.0 requires a peer of #angular/core#* but none is installed. You must install peer dependencies yourself.
npm WARN #ionic-native/globalization#3.14.0 requires a peer of rxjs#^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN The package gulp is included as both a dev and production dependency.
npm ERR! path /Users/louisro/Documents/BoardLine/node_modules/npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/louisro/Documents/BoardLine/node_modules/npm/node_modules/ansistyles' -> '/Users/louisro/Documents/BoardLine/node_modules/npm/node_modules/.ansistyles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/louisro/.npm/_logs/2018-04-16T21_04_03_502Z-debug.log
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/addHelper.js:312:25
at _rejected (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:797:24)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:823:30
at Promise.when (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1142:31)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:808:41)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44
at runSingle (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:137:13)
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:176:11)
(node:14587) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14587) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Here's my package.json:
{
"name": "my app",
"app_id": "bc689f",
"version": "1.0.0",
"description": "newIonic: An Ionic project",
"dependencies": {
"#ionic-native/globalization": "^3.2.0",
"#ionic/cloud": "^0.9.0",
"bluebird": "^3.4.6",
"cc.fovea.cordova.purchase": "~6.1.2",
"cordova-android": "~6.2.3",
"cordova-ios": "~4.3.1",
"cordova-plugin-admobpro": "~2.29.0",
"cordova-plugin-app-version": "~0.1.9",
"cordova-plugin-compat": "~1.1.0",
"cordova-plugin-console": "~1.0.7",
"cordova-plugin-datepicker": "https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git",
"cordova-plugin-device": "~1.1.6",
"cordova-plugin-extension": "~1.5.1",
"cordova-plugin-facebook4": "~1.9.1",
"cordova-plugin-geolocation": "~2.4.3",
"cordova-plugin-globalization": "~1.0.7",
"cordova-plugin-google-analytics": "~1.8.2",
"cordova-plugin-googleplus": "~5.1.1",
"cordova-plugin-network-information": "~1.3.3",
"cordova-plugin-splashscreen": "~4.0.3",
"cordova-plugin-statusbar": "~2.2.3",
"cordova-plugin-whitelist": "~1.3.2",
"cordova-plugin-x-socialsharing": "~5.1.8",
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.0.4",
"ionic-app-lib": "^2.2.0",
"ionic-plugin-deploy": "~0.6.7",
"ionic-plugin-keyboard": "~2.2.1",
"onesignal-cordova-plugin": "~2.1.2"
},
"devDependencies": {
"#ionic/cli-plugin-cordova": "1.4.0",
"#ionic/cli-plugin-gulp": "1.0.1",
"#ionic/cli-plugin-ionic1": "2.0.0",
"bower": "^1.3.3",
"gulp": "^3.9.1",
"gulp-replace-task": "^0.11.0",
"gulp-util": "^3.0.7",
"shelljs": "^0.3.0",
"yargs": "^5.0.0"
},
"cordovaPlugins": [
{
"locator": "https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git",
"id": "cordova-plugin-datepicker"
},
"ionic-plugin-deploy",
"cordova-plugin-extension",
"cordova-plugin-admobpro",
"cc.fovea.cordova.purchase",
"onesignal-cordova-plugin",
"cordova-plugin-geolocation",
"cordova-plugin-device",
"cordova-plugin-network-information",
"cordova-plugin-compat",
"cordova-plugin-app-version",
"cordova-plugin-console",
"cordova-plugin-globalization",
"cordova-plugin-google-analytics",
"cordova-plugin-googleplus",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"cordova-plugin-whitelist",
"cordova-plugin-x-socialsharing",
"ionic-plugin-keyboard",
{
"id": "cordova-plugin-facebook4",
"locator": "cordova-plugin-facebook4",
"variables": {
"APP_ID": "3996261696416",
"APP_NAME": "my app"
}
}
],
"cordovaPlatforms": [
"android#6.1.0",
{
"platform": "android",
"version": "",
"locator": "android"
}
],
"main": "gulpfile.js",
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://#bitbucket.org/linedevs/myapp.git"
},
"author": "",
"license": "ISC",
"homepage": "https://bitbucket.org/linedevs/myapp#readme",
"cordova": {
"platforms": [
"android",
"ios"
],
"plugins": {
"cc.fovea.cordova.purchase": {
"BILLING_KEY": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiqWZvb/CV3MWjSvTwRXrD3lt2BG8BGMoFjz8ZyBTkc"
},
"cordova-plugin-admobpro": {},
"cordova-plugin-app-version": {},
"cordova-plugin-compat": {},
"cordova-plugin-console": {},
"cordova-plugin-datepicker": {},
"cordova-plugin-device": {},
"cordova-plugin-extension": {},
"cordova-plugin-facebook4": {
"APP_ID": "___",
"APP_NAME": "my app"
},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "Line wants to offer the best experience."
},
"cordova-plugin-globalization": {},
"cordova-plugin-google-analytics": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "com.googleusercontent.apps.10ji"
},
"cordova-plugin-network-information": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-x-socialsharing": {},
"ionic-plugin-deploy": {},
"ionic-plugin-keyboard": {},
"onesignal-cordova-plugin": {}
}
}
}
And my ionic info:
$ ionic info
[WARN] Error with ./www/lib/ionic/version.json file: FILE_NOT_FOUND, trying
./bower.json.
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
Cordova Platforms : none
Ionic Framework : ionic1 1.3.2
System:
Node : v9.11.1
npm : not installed
OS : macOS Sierra
Environment Variables:
ANDROID_HOME : /home/louis/android-sdk-linux/
Misc:
backend : pro
First update the NPM
$npm update -g
then remove and add ios platform
$ionic cordova platform rm ios && ionic cordova platform add ios
this did the trick: https://stackoverflow.com/a/45491459/2217647
updating npm allowed $ cordova platform add ios to work.
Try this command instead of just using cordova.
Use this command $ionic cordova platform add ios --save.
And try updating the node modules and npm

Solving Peer Dependency requirements in react-native

I have the following package.json:
{
"name": "MovieReview",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"lodash": "^4.13.1",
"moment": "^2.13.0",
"native-base": "0.4.7",
"react": "15.1.0",
"react-native": "0.27.2",
"react-native-button": "^1.6.0",
"react-native-code-push": "^1.12.1-beta",
"react-native-easy-grid": "^0.1.6",
"react-native-gifted-spinner": "0.0.4",
"react-native-modalbox": "^1.3.3",
"react-native-router-flux": "^3.30.4",
"react-native-vector-icons": "^2.0.3",
"react-native-webview-android": "^1.1.6",
"react-redux": "4.4.5",
"redux": "^3.5.2",
"redux-persist": "^3.2.2",
"redux-thunk": "^2.1.0",
"rx": "^4.1.0",
"youtube-api": "^2.0.2"
},
"devDependencies": {
"chai": "^3.5.0",
"mocha": "^2.5.3",
"remote-redux-devtools": "^0.3.3",
"remote-redux-devtools-on-debugger": "^0.4.6"
}
}
I am trying to install the dependencies in this package.json. I have node v4.0.0 installed in my system.
My react-native version is 0.27.2:
$ react-native --version
react-native-cli: 1.0.0
react-native: 0.27.2
I am getting the following dependency errors when I try run npm install in my project folder:
$ sudo npm install
Password:
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/triple.s/.nvm/versions/node/v4.0.0/bin/node" "/Users/triple.s/.nvm/versions/node/v4.0.0/bin/npm" "install"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package react#15.1.0 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer native-base#0.4.7 wants react#15.0.2 - 15.1.0
npm ERR! peerinvalid Peer react-native#0.27.2 wants react#15.1.0
npm ERR! peerinvalid Peer react-redux#4.4.5 wants react#^0.14.0 || ^15.0.0-0
npm ERR! Please include the following file with any support request:
npm ERR! /Users/triple.s/Desktop/MovieReview/npm-debug.log
I tried changing the react version to 15.0.0 and 15.0.2 by modifying package.json, but still getting the same kind of error.
EDIT:
I updated npm using npm install -g npm and tried to install dependencies,
the following warning messages were thrown:
npm WARN native-base#0.4.7 requires a peer of react#15.0.2 - 15.1.0 but none was installed.
npm WARN react-native#0.27.2 requires a peer of react#15.1.0 but none was installed.
Does that mean, native-base and react-native not installed?

Resources