Closed Lelelo1 closed 4 years ago
Interesting! Yes, RNS isn’t officially supported by the NativeScript Core team (and therefore the NativeScript CLI) yet. As you guessed, the command likely overwrites those two config files with NativeScript Core in mind. Specifically, AppContainer wasn’t found because that script must have removed the rule that tells the Webpack loader to look for tsx
files.
I can’t fix this myself, unfortunately; the Core team will have to step in and support RNS first.
But this does remind me: I’d better upgrade the sample project to NS 6 (it’s currently on NS 5.4). I have an NS 6 project working fine by following the repo instructions, so I can confirm that NS 6 is supported by RNS, at least.
I upgraded the sample project to NS 6 today. Here's the diff that you need to apply when upgrading a NativeScript 5.x project to 6.x: 34fe0d9
The NativeScript CLI team have instructed me on how to support starter templates, and to some extent hooks, which will have some impact on the tns migrate
experience – though this would probably only be from {N} version 6 onwards.
It's on my to-do list to complete (but I'm quite busy this month).
I've provided a React template for NativeScript CLI:
tns create myApp --template tns-template-blank-react
cd myApp
tns run ios
I'm not sure what's involved in tns migrate
. If it simply diffs between versions of the template, then my work here is done. If it's something more elaborate, then it's out-of-scope for me anyway, as the CLI tools are developed by the NativeScript team.
When
tns run ios --no-hmr
- I encountered the prompt to update:So I ran
tns migrate
- but it created an error:...That wouldn't go away. I made sure the export and import where correct - and had made no recent edits to the code.
It was solved by copying the old
tsconfig.tns.json
andwebpack.config.js
into the migrated project version - since I read thetns upgrade
made edits to those files