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?
Related
I create a project with create-react-app. I get this error when i run docker build frontend -t my-frontend . :
> frontend#0.1.0 build /app
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to load plugin 'jest' declared in 'package.json ยป eslint-config-react-app/jest': Cannot read property 'meta' of undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend#0.1.0 build 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! /root/.npm/_logs/2022-01-27T11_11_23_140Z-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code: 1
how should i fix it? i tried npm install,npm install .,npm audit fix.
this is jest in my package.json :
{
...
"dependencies": {
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
...,
"web-vitals": "^1.0.1"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
...
}
and this is jest in my package.lock.json :
"eslint-plugin-jest": {
"version": "24.1.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.1.3.tgz",
"integrity": "...",
"requires": {
"#typescript-eslint/experimental-utils": "^4.0.1"
}
},
I also saw eslint-plugin-jest gives "ESLint stack trace: TypeError: Cannot read property 'meta' of undefined" that says: " This was a temporary issue in 22.6 up to 22.6.2" but my version is 24.1.3 .
Fixed by npm audit fix --force but before run, make sure it does not damage your project.
npm audit fix only modifies the dependencies that shouldn't cause problems based on SEMVER rules. The --force is a dangerious option because it upgrades the dependencies regardless of any rules. This can cause a dependency to go from version 1.2. 0 to version 2.3.
What did a npm audit fix --force change and how do you fix it?
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"
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.
I am new in Jenkins. I want run automatically my Protractor tests in Jenkins job.
This is my package.js file:
{
"name": "ui",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "5.2.0",
"#angular/common": "5.2.0",
"#angular/compiler": "5.2.0",
"#angular/core": "5.2.0",
"#angular/forms": "5.2.0",
"#angular/http": "5.2.11",
"#angular/platform-browser": "5.2.0",
"#angular/platform-browser-dynamic": "5.2.0",
"#angular/router": "5.2.0",
"bootstrap": "4.1.1",
"core-js": "2.4.1",
"jquery": "3.3.1",
"ngx-bootstrap": "^3.0.1",
"popper.js": "^1.14.3",
"protractor-jasmine2-html-reporter": "0.0.7",
"protractor-jasmine2-reporter": "^1.1.0",
"protractor-jasmine2-screenshot-reporter": "^0.5.0",
"rxjs": "5.5.6",
"zone.js": "0.8.19"
},
"devDependencies": {
"#angular/cli": "1.7.3",
"#angular/compiler-cli": "5.2.0",
"#angular/language-service": "5.2.0",
"#types/jasmine": "2.8.3",
"#types/jasminewd2": "2.0.2",
"#types/node": "6.0.60",
"codelyzer": "4.0.1",
"jasmine-core": "2.8.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "2.0.2",
"karma-chrome-launcher": "2.2.0",
"karma-coverage-istanbul-reporter": "1.2.1",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.3.2",
"ts-node": "4.1.0",
"tslint": "5.9.1",
"typescript": "2.5.3"
}
}
This is my protractor.confing.js:
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
seleniumAddress: 'http://HubDomain-IP:4444/wd/hub',
//Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome',
// add node-name as applicationName where you have started node and wanted to remotely execute test cases
'applicationName': 'remoteNode'
},
chromeDriver: 'C:/Users/<username>/AppData/Roaming/npm/node_modules/protractor/selenium/chromedriver.exe',
seleniumServerJar: 'C:/Users/<username>/AppData/Roaming/npm/node_modules/protractor/selenium/selenium-server-standalone-2.40.0.jar',
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function () { }
},
suites: {
full: 'e2e/**/**/*.ts',
powerMax200: 'e2e/tests/powerMax2000/*.ts',
powerMax200: 'e2e/tests/powerMax8000/*.ts',
vmax250f: 'e2e/tests/vmax250f/*.ts',
vmax950f: 'e2e/tests/vmax950f/*.ts'
},
onPrepare() {
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
require('ts-node').register({
// project: 'e2e/tsconfig.e2e.json',
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
savePath: './e2e/report',
screenshotsFolder: 'images'
}));
}
};
In my Jenkins job I pull code from BitBucket repository. And I execute Windows batch commands:
1) cd NewGenProject/ui/
npm install
2) cd NewGenProject/ui/
npm -g install protractor
3) cd NewGenProject/ui/
npm install -g #angular/cli
./node_modules.bin\webdriver-manager update
And i have error in console :
Started by user Admin
Building in workspace C:\Program Files (x86)\Jenkins\workspace\newGen_protractor
> C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> C:\Program Files\Git\bin\git.exe config remote.origin.url https://___somi#bitbucket.org/night_riders/desingstudio_new_gen.git # timeout=10
Fetching upstream changes from https://___somi#bitbucket.org/night_riders/desingstudio_new_gen.git
> C:\Program Files\Git\bin\git.exe --version # timeout=10
using GIT_ASKPASS to set credentials
> C:\Program Files\Git\bin\git.exe fetch --tags --progress https://___somi#bitbucket.org/night_riders/desingstudio_new_gen.git +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/application.properties
Seen branch in repository origin/develop
Seen branch in repository origin/master
Seen 3 remote branches
> C:\Program Files\Git\bin\git.exe show-ref --tags -d # timeout=10
Checking out Revision 4af5b739aa52943c28f58d128d5f28bffa095463 (origin/application.properties)
> C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
> C:\Program Files\Git\bin\git.exe checkout -f 4af5b739aa52943c28f58d128d5f28bffa095463
Commit message: "a"
> C:\Program Files\Git\bin\git.exe rev-list --no-walk 4af5b739aa52943c28f58d128d5f28bffa095463 # timeout=10
System is not Unix, Xvfb will not be started
[newGen_protractor] $ cmd /c call C:\Windows\TEMP\jenkins205557989357167568.bat
C:\Program Files (x86)\Jenkins\workspace\newGen_protractor>cd NewGenProject/ui/
C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui>npm install
npm WARN #angular/http#5.2.11 requires a peer of #angular/core#5.2.11 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/http#5.2.11 requires a peer of #angular/platform-browser#5.2.11 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-bootstrap#3.0.1 requires a peer of #angular/common#>=6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-bootstrap#3.0.1 requires a peer of #angular/core#>=6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
audited 7548 packages in 39.325s
found 8 vulnerabilities (2 low, 5 moderate, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details
[newGen_protractor] $ cmd /c call C:\Windows\TEMP\jenkins6721521287779075208.bat
C:\Program Files (x86)\Jenkins\workspace\newGen_protractor>cd NewGenProject/ui/
C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui>npm -g install protractor
C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\protractor -> C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules\protractor\bin\protractor
C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\webdriver-manager -> C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules\protractor\bin\webdriver-manager
+ protractor#5.4.1
updated 1 package in 15.574s
[newGen_protractor] $ cmd /c call C:\Windows\TEMP\jenkins3967655168792638034.bat
C:\Program Files (x86)\Jenkins\workspace\newGen_protractor>cd NewGenProject/ui/
C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui>npm install -g #angular/cli
C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\ng -> C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules\#angular\cli\bin\ng
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\#angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ #angular/cli#6.2.2
updated 1 package in 41.598s
[newGen_protractor] $ cmd /c call C:\Windows\TEMP\jenkins7519801179326584034.bat
C:\Program Files (x86)\Jenkins\workspace\newGen_protractor>cd NewGenProject/ui/
C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui>ng e2e --no-webdriver-update
Your global Angular CLI version (6.2.1) is greater than your local
version (1.7.3). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
** NG Live Development Server is listening on localhost:49156, open your browser on http://localhost:49156/ **
[0mDate: [1m[37m2018-09-18T11:33:38.940Z[39m[22m[0m
[0mHash: [1m[37mb824d4ffc831966e2310[39m[22m[0m
[0mTime: [1m[37m32450[39m[22mms[0m
[0mchunk {[1m[33minline[39m[22m} [1m[32minline.bundle.js, inline.bundle.js.map[39m[22m (inline) 3.89 kB [1m[33m[entry][39m[22m[1m[32m [rendered][39m[22m[0m
[0mchunk {[1m[33mmain[39m[22m} [1m[32mmain.bundle.js, main.bundle.js.map[39m[22m (main) 240 kB [1m[33m[initial][39m[22m[1m[32m [rendered][39m[22m[0m
[0mchunk {[1m[33mpolyfills[39m[22m} [1m[32mpolyfills.bundle.js, polyfills.bundle.js.map[39m[22m (polyfills) 203 kB [1m[33m[initial][39m[22m[1m[32m [rendered][39m[22m[0m
[0mchunk {[1m[33mscripts[39m[22m} [1m[32mscripts.bundle.js, scripts.bundle.js.map[39m[22m (scripts) 158 kB [1m[33m[initial][39m[22m[1m[32m [rendered][39m[22m[0m
[0mchunk {[1m[33mstyles[39m[22m} [1m[32mstyles.bundle.js, styles.bundle.js.map[39m[22m (styles) 158 kB [1m[33m[initial][39m[22m[1m[32m [rendered][39m[22m[0m
[0mchunk {[1m[33mvendor[39m[22m} [1m[32mvendor.bundle.js, vendor.bundle.js.map[39m[22m (vendor) 6.04 MB [1m[33m[initial][39m[22m[1m[32m [rendered][39m[22m[0m
(node:3240) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
webpack: Compiled successfully.
[13:33:39] I/launcher - Running 1 instances of WebDriver
[13:33:39] I/direct - Using ChromeDriver directly...
[13:33:39] E/direct - Error code: 135
[13:33:39] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[13:33:39] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
at Direct.getNewDriver (C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\protractor\built\driverProviders\direct.js:63:31)
at Runner.createBrowser (C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\protractor\built\runner.js:195:43)
at q.then.then (C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\q\q.js:796:13)
at C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\q\q.js:556:49
at runSingle (C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\q\q.js:137:13)
at flush (C:\Program Files (x86)\Jenkins\workspace\newGen_protractor\NewGenProject\ui\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)
[13:33:39] E/launcher - Process exited with error code 135
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Change following 3 cmd lines in Jenkins job:
cd NewGenProject/ui/
npm install
node_moduels\.bin\ng e2e --webdriver-update
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