I am trying to upgrade an older project to run with the latest NativeScript version. I am following the steps outlined in the NativeScript Upgrade page. As far as I can tell this project was working with 4.2.0 of the platform, and 6.1.0 of the Angular libraries, as well as the following dev-dependencies:
"nativescript-dev-typescript": "~0.7.3", "nativescript-dev-webpack": "0.15.1",
When I run the command
npm i nativescript-dev-typescript@latest --save-dev to update TS, the file used in the next step:
./node_modules/.bin/ns-upgrade-tsconfig is missing. The same happens with the webpack step.
I tried ignoring this and completed the other upgrade steps, yet when I attempt to run my app I get errors that point me to this article that leaves me in the same situation (
./node_modules/.bin/update-ns-webpack --deps --configs fails to run as the file is missing)
I have tried downloading the .zip files from github and manually adding these scripts into my
.bin folder, however they fail to run with missing dependencies.
Finally as a last resort I reverted all of my changes to the app, and try to build and it fails, I assume because I have the latest version of NativeScript installed now. N.B. The app was building and working fine before I tried to do the upgrade steps.
Here is the current error I am getting (after reverting everything and attempting to build with Sidekick)
[19-04-15 14:46:04.000] Error detected during LiveSync on emulator-5554 for D:\Documents\GitHub\geonasium-app. Error: Command gradlew.bat failed with exit code 1 Error output: Exception in thread "main" java.io.IOException: Couldn't find 'D:\Documents\GitHub\geonasium-app\platforms\android\build-tools\sbg-bindings.txt' bindings input file. Most probably there's an error in the JS Parser execution. You can run JS Parser with verbose logging by executing "node 'D:\Documents\GitHub\geonasium-app\platforms\android\build-tools\jsparser\js_parser.js' enableErrorLogging". at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:126) at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:97) at org.nativescript.staticbindinggenerator.Main.main(Main.java:48) FAILURE: Build failed with an exception.
Ultimately I would just like to get my app updated to the latest NativeScript, TypeScript, Webpack and Angular
UPDATE I deleted package-lock.json, tsconfig.json and webpack.js, as well as removed reference to nativescript-dev-typescript and nativescript-dev-webpack from package.json. I cleaned the hooks, node_modules and platforms folders and ran the upgrade steps again.
This time the TypeScript step was succesful and I have the ns-upgrade-tsconfig script in my node_modules/.bin folder however the webpack step failed and it's upgrade script is still missing.