Skip to content

[2.5.*] tns run always add latest platform #2782

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
tsonevn opened this issue May 5, 2017 · 7 comments
Closed

[2.5.*] tns run always add latest platform #2782

tsonevn opened this issue May 5, 2017 · 7 comments
Assignees
Milestone

Comments

@tsonevn
Copy link
Contributor

tsonevn commented May 5, 2017

From @3rror404 on May 4, 2017 15:52

I'm still using N 2.5.4 as I don't have time to upgrade to version 3 yet.

After I removed the iOS platform and re-added I noticed that the platform had been upgraded to 3.0.0. After removing the platform again and reinstalling the 2.5.0 version with tns platform add [email protected] I can no longer run my project.

Project successfully prepared (ios)
Searching for devices...
Building project...
Expected "// !$*UTF8*$!" but "<" found.
# run ios

I've tried numerous things including removing iOS and installing the 3.0.0 version. Removing the hooks, node_modules and platforms folders all with the same result.

Any ideas?

┌──────────────────┬─────────────────┬────────────────┬──────────────────┐
│ Component        │ Current version │ Latest version │ Information      │
│ nativescript     │ 2.5.4           │ 3.0.0          │ Update available │
│ tns-core-modules │ 2.5.2           │ 3.0.0          │ Update available │
│ tns-android      │ 3.0.0           │ 3.0.0          │ Up to date       │
│ tns-ios          │ 2.5.0           │ 3.0.0          │ Update available │
└──────────────────┴─────────────────┴────────────────┴──────────────────┘

Copied from original issue: NativeScript/NativeScript#4115

@tsonevn tsonevn self-assigned this May 5, 2017
@tsonevn
Copy link
Contributor Author

tsonevn commented May 5, 2017

Hi @3rror404 ,
Thank you for reporting this issue.

I tested it on my side and I have to confirm that this is a real issue, while using an old CLI.
If we have an old project, using runtime 2.5.0 and build with tns run <platform_name> tns-iosandtns -android` will be automatically updated to version 3.0.

Workaround:

  1. tns platform remove <platform_name>
  2. tns platform add <platform_name>@2.5.0
  3. tns prepare <platform_name>
  4. tns run <platform_name>

@dtopuzov dtopuzov changed the title Expected "// !$*UTF8*$!" but "<" found. [}2.5.*] tns run always add latest platform May 5, 2017
@dtopuzov dtopuzov changed the title [}2.5.*] tns run always add latest platform [2.5.*] tns run always add latest platform May 5, 2017
@dtopuzov dtopuzov added this to the 2.5.5 milestone May 5, 2017
@Cae2
Copy link

Cae2 commented May 5, 2017

I think that this workaround isnt working with me.. I'm using tns 2.5.4 and it is still installing tns-android 3

3 0

@3rror404
Copy link

3rror404 commented May 5, 2017

Same here.

@tsonevn
Copy link
Contributor Author

tsonevn commented May 5, 2017

Hi @Cae2, @3rror404
Excuse me for the mistake. I forgot to specify the runtime version while adding the platform. For example: tns platform add <platform_name>@2.5.0. I also update my previous answer.
Now the workaround should work for you.

@3rror404
Copy link

3rror404 commented May 5, 2017

I did actually try that thinking that you might have made a mistake and I still received the same error:

Expected "// !$*UTF8*$!" but "<" found.

@m-abs
Copy link

m-abs commented May 5, 2017

The workaround doesn't work when I try publish a bundled version.
ns-bundle removes the platform and adds it against, so I'm still have [email protected].

@dtopuzov
Copy link
Contributor

@m-abs, @3rror404, @Cae2 Fix is available in {N} 2.5.5

npm un -g nativescript
npm cache clean
npm i -g [email protected]

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

No branches or pull requests

5 participants