Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hpirela opened this issue Sep 3, 2020 · 5 comments

Comments

@hpirela
Copy link

hpirela commented Sep 3, 2020

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)

@ericaskari
Copy link

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 😇

@hpirela
Copy link
Author

hpirela commented Sep 5, 2020

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"
]

@bcerquiare
Copy link

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

@plackowski
Copy link

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

@bcerquiare
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants