Git Product home page Git Product logo

Comments (5)

NickIliev avatar NickIliev commented on June 30, 2024 3

@montella1507 I've tried to reproduce the issue to no avail (used this test project). Keep in mind that you should build/run your project by including the --bundle flag.

Try updating the required dependencies to the latest versions

npm i -g nativescript
npm i -g @angular/cli
npm i -g @nativescript/schematics

and then building with Webpack

tns run android --bundle

from nativescript-schematics.

montella1507 avatar montella1507 commented on June 30, 2024 3

Hi @sis0k0 got it. So there is a file-replacement plugin in webpack build.. got it. Errors are misleading... especially if i can fix 80% of them by installing rxjs-compact - the same solution as in your KendoUI components.

Is it possible to add this information about --bundle flag to your documentation here?

https://docs.nativescript.org/code-sharing/creating-a-new-project

You have blogpost about sharing the code here:
https://www.nativescript.org/blog/code-sharing-between-web-and-mobile-with-angular-and-nativescript
however the project your tutorial is based on is maintained no more... So
https://docs.nativescript.org/code-sharing/creating-a-new-project is everything we have now...

Please add the information about "how to buiild and run both for web and mobile". Thank you guys.

from nativescript-schematics.

NickIliev avatar NickIliev commented on June 30, 2024 2

@montella1507 thanks for pointing out the outdated blog information.
Information about building the code-shared project is posted in details in this documentation article

NOTE: The --bundle flag notifies the NativeScript CLI to use Webpack to build a mobile app from the code-sharing project. Webpack is a hard dependency for code-sharing projects, and you must use this flag for your project to run successfully.

from nativescript-schematics.

sis0k0 avatar sis0k0 commented on June 30, 2024 1

Hi @montella1507, the structure of the projects created with @nativescript/schematics works only with webpack. During build we replace the input file system of the webpack compilation, so that we can bundle the .tns files, which are specific to NativeScript.

from nativescript-schematics.

montella1507 avatar montella1507 commented on June 30, 2024

@NickIliev thank you for your response. Fixed with --bundle flag. But why? Why do i have to use --bundle flag? As far as i know - bundle flag is to use webpack bundler to reduce starting time etc.

Why i cannot build this solution without --bundle flag ?

from nativescript-schematics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.