You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to test a contribution to the v6 tns-core-modules and tns-core-modules-widgets, and running into problems following the DevelopmentWorkflow.md. I think it is outdated.
In short, I want to modify a .ts file in tns-core-modules and be able to test the modification in a v6 NativeScript app in another directory.
Running Another App indicates changes require TS rebuild (tsc), however it does not specify which package.json script target to run. My hunch is it is dev-tsc-all but this script has a bug in it (pr below) AND after running, the .js files end up in bin/dist/tns-core-modules/ without a package.json (so npm link will not work). compile-all script does the same.
dev-link-tns-core-modules-widgets script references a dist/package dir that DNE.
I'm happy to do the work to PR an update to the docs, however I need some clarity on the right way to do it 1st.
Here is my workflow - what am I doing wrong?
Fork and clone
git checkout -b my-feature/fix-branch
npm install
npm run compile-all
From root of my NS proj: npm link ../<where I cloned>/tns-core-modules-widgets/ && npm link ../<where I cloned>/tns-core-modules
From here I can't determine the recommended way to compile (tsc). Is it npm run compile-all? Is it npm run tsc-w? I'm going to be making changes to tns-core-modules AND tns-core-modules-widgets so my guess is npm run tsc-w. A clear recommendation needs to be documented in DevelopmentWorkflow.md.
$ npm run tsc-w
In another tab:
$ cd projects/v6test
$ tns run ios
Crashes again, this time with a different error:
CONSOLE ERROR file:///src/Users/ryan/projects/NativeScript/tns-core-modules/trace/trace.ts:184:30 Error: Could not load CSS from app.css: TypeError: Expected module identifier to be a string.
I got the same exact error CONSOLE ERROR file:///src/Users/ryan/projects/NativeScript/tns-core-modules/trace/trace.ts:184:30 Error: Could not load CSS from app.css: TypeError: Expected module identifier to be a string.
@vpiskunov@mohammedzamakhan please try reproduction steps mentioned in the new issue above. Note you need to update master to pull in v6.1.0 release.
If you are able to reproduce, I'd appreciate a thumbs up or some comment in new issue to help get some visibility. I've been blocked for ~2wks. My hope is I'm just doing something stupid / missing a step.
FWIW since v6.1.0 the crash is manifesting itself without the error message noted in this issue.
Hi all,
The problem with the modules linking for NativeScript Angular projects seems to be connected to nativescript-dev-webpack. I am closing this issue in favour of NativeScript/nativescript-dev-webpack#1044
Activity
NickIliev commentedon Aug 29, 2019
@rynop the developer workflow document is now being updated via this PR - can you try the simplified steps and let us know if that is works for you.
rynop commentedon Aug 29, 2019
Unfortunately, that did not work either. Reproduction steps:
tns run iosto emulator, crashes. Full log hereI then:
From here I can't determine the recommended way to compile (tsc). Is it
npm run compile-all? Is itnpm run tsc-w? I'm going to be making changes to tns-core-modules AND tns-core-modules-widgets so my guess isnpm run tsc-w. A clear recommendation needs to be documented inDevelopmentWorkflow.md.In another tab:
Crashes again, this time with a different error:
Full log here.
Hopefully this helps you reproduce. Thanks in advance for your help as I'm blocked on this.
mohammedzamakhan commentedon Sep 7, 2019
I got the same exact error CONSOLE ERROR file:///src/Users/ryan/projects/NativeScript/tns-core-modules/trace/trace.ts:184:30 Error: Could not load CSS from app.css: TypeError: Expected module identifier to be a string.
vpiskunov commentedon Sep 9, 2019
Same error here, any fix?
rynop commentedon Sep 9, 2019
I'll make a new issue that is specifically targeted at this error.
vpiskunov commentedon Sep 9, 2019
@rynop sure, please add a link here once created.
rynop commentedon Sep 9, 2019
@vpiskunov @mohammedzamakhan please try reproduction steps mentioned in the new issue above. Note you need to update master to pull in v6.1.0 release.
If you are able to reproduce, I'd appreciate a thumbs up or some comment in new issue to help get some visibility. I've been blocked for ~2wks. My hope is I'm just doing something stupid / missing a step.
FWIW since v6.1.0 the crash is manifesting itself without the error message noted in this issue.
mohammedzamakhan commentedon Sep 9, 2019
I simply created a new nativescirpt app using Angular CLI after installing nativescript schematics
npm i -g @nativescript/schematicsusing the commandng new --schematics=@nativescript/schematics HelloWorldand ran preview using
npx --p nativescript tns preview, and I get this errormcorway commentedon Sep 11, 2019
For anyone getting the
Error: Could not load CSS from app.css: TypeError: Expected module identifier to be a string.css issue.Update
nativescript-dev-webpackto 1.2 (npm install --save-dev nativescript-dev-webpack) as per @elena-p comment here: https://github.com/NativeScript/nativescript-angular/issues/1975#issuecomment-530243719 .I had this issue and upgrading
nativescript-dev-webpackfixed it.tsonevn commentedon Sep 13, 2019
Hi all,
The problem with the modules linking for NativeScript Angular projects seems to be connected to nativescript-dev-webpack. I am closing this issue in favour of NativeScript/nativescript-dev-webpack#1044
rynop commentedon Sep 13, 2019
Should
npm run tsc-wbe added toDevelopmentWorkflow.md? Or one of the other compile scripts in package.json? For example, following https://github.com/NativeScript/NativeScript/blob/master/DevelopmentWorkflow.md#running-another-app will not work unless some sort of compile is done. Atns-core-modules*noob like me was/is not clear on the recommended way.