Error with command tns platform add ios


#1

Hi,
I’m facing an error while trying to add ios platform to the existing nativescript app

This is the error message

cp: no such file or directory: node_modules/ansi-regex/framework/*

Command terminates after that error.

Thank you.


#2

I can confirm that this error only happening with nativescript version 3.1.3

I’ve downgraded my nativescript version 3.1.2 and then command ran successfully.

For the reference below is my package.json.

{
“nativescript”: {
“id”: “ABCD”,
“tns-android”: {
“version”: “3.1.0”
},
“tns-ios”: {
“version”: “3.1.0”
}
},
“dependencies”: {
"@angular/animations": “~4.1.0”,
"@angular/common": “~4.1.0”,
"@angular/compiler": “~4.1.0”,
"@angular/core": “~4.1.0”,
"@angular/forms": “~4.1.0”,
"@angular/http": “~4.1.0”,
"@angular/platform-browser": “~4.1.0”,
"@angular/router": “~4.1.0”,
"@types/reflect-metadata": “0.0.5”,
“nativescript-angular”: “^3.1.1”,
“nativescript-barcodescanner”: “^2.5.4”,
“nativescript-exit”: “^1.0.0”,
“nativescript-fancyalert”: “^1.1.2”,
“nativescript-geolocation”: “^3.0.0”,
“nativescript-loading-indicator”: “^2.3.2”,
“nativescript-material-icons”: “^1.0.3”,
“nativescript-ng2-fonticon”: “^1.3.4”,
“nativescript-permissions”: “^1.2.3”,
“nativescript-rich-textfield”: “^1.0.0”,
“nativescript-telerik-ui-pro”: “file:…/…/…/Documents/Telerik/UI for NativeScript 3.0.0.292/Packages/nativescript-ui-pro.tgz”,
“nativescript-theme-core”: “~1.0.2”,
“nativescript-toast”: “^1.4.5”,
“reflect-metadata”: “^0.1.10”,
“rxjs”: “~5.3.0”,
“tns-core-modules”: “^3.1.0”,
“zone.js”: “~0.8.2”
},
“devDependencies”: {
"@angular/compiler-cli": “~4.1.0”,
"@ngtools/webpack": “~1.5.0”,
“babel-traverse”: “6.24.1”,
“babel-types”: “6.24.1”,
“babylon”: “6.17.0”,
“copy-webpack-plugin”: “~4.0.1”,
“extract-text-webpack-plugin”: “~3.0.0”,
“lazy”: “1.0.11”,
“nativescript-css-loader”: “~0.26.0”,
“nativescript-dev-typescript”: “^0.5.0”,
“nativescript-dev-webpack”: “^0.7.3”,
“raw-loader”: “~0.5.1”,
“resolve-url-loader”: “~2.1.0”,
“typescript”: “^2.3.4”,
“webpack”: “~3.2.0”,
“webpack-bundle-analyzer”: “^2.8.2”,
“webpack-sources”: “~1.0.1”
},
“scripts”: {
“ns-bundle”: “ns-bundle”,
“publish-ios-bundle”: “npm run ns-bundle --ios --publish-app”,
“generate-android-snapshot”: “generate-android-snapshot --targetArchs arm,arm64,ia32 --install”,
“start-android-bundle”: “npm run ns-bundle --android --run-app”,
“start-ios-bundle”: “npm run ns-bundle --ios --run-app”,
“build-android-bundle”: “npm run ns-bundle --android --build-app”,
“build-ios-bundle”: “npm run ns-bundle --ios --build-app”
}
}