nativescript-schematics icon indicating copy to clipboard operation
nativescript-schematics copied to clipboard

command ng new --collection=@nativescript/schematics my-share-app --shared .no create webpack.config.js file

Open hpirela opened this issue 4 years ago • 5 comments

Environment Angular 10 NS 7.0.4 nativescript/schematic 10

Describe the bug after run ng new --collection=@nativescript/schematics my-share-app --shared the file webpack.config.js is not created under the main folder

To Reproduce run the above command

Expected behavior Webpack.config.js file created and associated dependencies (if exist any)

hpirela avatar Sep 03 '20 03:09 hpirela

Environment Angular 10 NS 7.0.4 nativescript/schematic 10

Describe the bug after run ng new --collection=@nativescript/schematics my-share-app --shared the file webpack.config.js is not created under the main folder

To Reproduce run the above command

Expected behavior Webpack.config.js file created and associated dependencies (if exist any)

run tns migrate 😇

ericaskari avatar Sep 03 '20 18:09 ericaskari

Environment Angular 10 NS 7.0.4 nativescript/schematic 10 Describe the bug after run ng new --collection=@nativescript/schematics my-share-app --shared the file webpack.config.js is not created under the main folder To Reproduce run the above command Expected behavior Webpack.config.js file created and associated dependencies (if exist any)

run tns migrate 😇

thanks, however we need modify the tsconfig.json with the following changes too: add on compilerOptions : "importHelpers": true

and rearrange path as following: "paths": { "@src/": [ "src/.ts", "src/.android.ts", "src/.ios.ts", "src/.tns.ts", "src/.web.ts" ]

hpirela avatar Sep 05 '20 04:09 hpirela

facing the same error here. After doing the changes above the "ng serve" execute without problem, but the "ns run android" give these errors:

ERROR in src/app/home/home.component.ts:8:14 - error NG6007: The Component 'HomeComponent' is declared by more than one NgModule.

8 export class HomeComponent implements OnInit {
               ~~~~~~~~~~~~~

  src/app/app.module.tns.ts:15:5
    15     HomeComponent,
           ~~~~~~~~~~~~~
    'HomeComponent' is listed in the declarations of the NgModule 'AppModule'.
  src/app/app.module.ts:15:5
    15     HomeComponent,
           ~~~~~~~~~~~~~
    'HomeComponent' is listed in the declarations of the NgModule 'AppModule'.
src/app/app.component.ts:8:14 - error NG6007: The Component 'AppComponent' is declared by more than one NgModule.

8 export class AppComponent {
               ~~~~~~~~~~~~

  src/app/app.module.tns.ts:14:5
    14     AppComponent,
           ~~~~~~~~~~~~
    'AppComponent' is listed in the declarations of the NgModule 'AppModule'.
  src/app/app.module.ts:14:5
    14     AppComponent,
           ~~~~~~~~~~~~
    'AppComponent' is listed in the declarations of the NgModule 'AppModule'.

Looks like it not ignoring .ts when have a .tns.ts file

bcerquiare avatar Sep 14 '20 13:09 bcerquiare

@bcerquiare The same issue in my project. Did you find any solution?

plackowski avatar Oct 26 '20 13:10 plackowski

@bcerquiare The same issue in my project. Did you find any solution?

@Arystosedes A few weeks ago updated nativescript cli and schematics. Now its ok to work

bcerquiare avatar Oct 29 '20 11:10 bcerquiare