Skip to content

Can no longer 'tns platform add ios', ENOENT. #1054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
emiloberg opened this issue Oct 13, 2015 · 3 comments
Closed

Can no longer 'tns platform add ios', ENOENT. #1054

emiloberg opened this issue Oct 13, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@emiloberg
Copy link

All of a sudden, when adding iOS platform (tns platform add ios), I get:

ENOENT, open '/Users/emiloberg/code/slask/cleanproj/clean/platforms/ios/__PROJECT_NAME__/main.m

As far as I know, nothing has changed on my machine, no updates, no nothing.

How to repeat:

~/code/slask
▶ npm cache clean

~/code/slask
▶ node -v
v0.10.33

~/code/slask
▶ tns --version
1.3.0

~/code/slask
▶ mkdir cleanproj

~/code/slask
▶ cd cleanproj

code/slask/cleanproj
▶ tns create clean
Project clean was successfully created

code/slask/cleanproj
▶ cd clean

slask/cleanproj/clean
▶ tns platform add ios
zsh: correct 'platform' to 'platforms' [nyae]? n
Copying template files...
ENOENT, open '/Users/emiloberg/code/slask/cleanproj/clean/platforms/ios/__PROJECT_NAME__/main.m'
# platform add
┌────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────┐
│ Usage                  │ Synopsis                                                                                     │
│ Android latest runtime │ $ tns platform add android [--frameworkPath <File Path>] [--symlink] [--sdk <API Level>]     │
│ Android selected       │ $ tns platform add android[@<Version>] [--frameworkPath <File Path>] [--symlink] [--sdk <API │
│ runtime                │ Level>]                                                                                      │
│ iOS latest runtime     │ $ tns platform add ios [--frameworkPath <File Path>] [--symlink]                             │
│ iOS selected runtime   │ $ tns platform add ios[@<Version>] [--frameworkPath <File Path>] [--symlink]                 │
└────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────┘

Configures the current project to target the selected platform.

### Options

    * --frameworkPath - Sets the path to a NativeScript runtime for the specified platform that you want to use instead of the default runtime. If --symlink is specified, <File Path> must point to directory in which the runtime is already extracted. If --symlink is not specified, <File Path> must point to a valid npm package.
    * --symlink - Creates a symlink to a NativeScript runtime for the specified platform that you want to use instead of the default runtime. If --frameworkPath is specified, creates a symlink to the specified directory. If --frameworkPath is not specified, creates a symlink to platform runtime installed with your current version of NativeScript.
    * --sdk - Sets the target Android SDK for the project.

### Attributes

    * <API Level> is a valid Android API level. For example: 17, 19, MNC.
    * <File Path> is the complete path to a valid npm package or a directory that contains a NativeScript runtime for the selected platform.
    * <Version> is any available version of the respective platform runtime published in npm.
@Fatme
Copy link
Contributor

Fatme commented Oct 13, 2015

Hi @emiloberg,

Can you try to execute npm i -g tns-ios?

@emiloberg
Copy link
Author

Did, tns-ios was reinstalled, but error still persists.

Taking a peek at the tns-ios package.json (/Users/emiloberg/.npm-global/lib/node_modules/tns-ios/package.json) it says "version": "1.4.0" and points to a commit which is updated just a couple of days ago. Is this really right? Looks like it's trying to use 1.4 stuff for my 1.3 environment.

package.json:

{
  "name": "tns-ios",
  "description": "Telerik NativeScript Runtime for iOS",
  "version": "1.4.0",
  "keywords": [
    "NativeScript",
    "iOS",
    "runtime"
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/NativeScript/ios-runtime/commit/7830ed7b55b8988b03135cb764c246c66238b98f"
  },
  "author": {
    "name": "Telerik",
    "email": "support@telerik.com"
  },
  "os": [
    "darwin"
  ],
  "directories": {},
  "files": [
    "**/*"
  ],
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-contrib-clean": "^0.5.0",
    "grunt-contrib-copy": "^0.5.0",
    "grunt-grunt": "^0.2.2",
    "grunt-mkdir": "^0.1.2",
    "grunt-modify-json": "^0.1.1",
    "grunt-shell": "^0.7.0",
    "shelljs": "^0.3.0",
    "ws": "^0.7.1"
  },
  "license": "Apache-2.0",
  "scripts": {
    "postinstall": "unzip './WebInspectorUI/NativeScript Inspector.zip' -d ./WebInspectorUI"
  },
  "readme": "ERROR: No README data found!",
  "_id": "tns-ios@1.4.0",
  "_from": "tns-ios@*"
}

@Fatme
Copy link
Contributor

Fatme commented Oct 13, 2015

Hi @emiloberg,

We've found the problem and we're working on the fix. In the meantime you can use tns platform add ios@1.3.0 command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants