Not able to find app.module.ts
See original GitHub issueI’m submitting a…
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
In package
[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[x] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug
Current behavior
When trying to install the ng-toolkit in a ngx-rocket generated project. It returns the following error:
INFO: Project property is set to 'demo-pwa'.
ERROR: The file (./src/@app/app.module.ts) does not exist.
ERROR: If you think that this error shouldn't occur, please fill up bug report here: https://github.com/maciejtreder/ng-toolkit/issues/new
INFO: stacktrace has been sent to tracking system.
When I try to run the following command:
npm run build:prod
I get following error:
npm ERR! missing script: build:prod
npm ERR!
npm ERR! Did you mean this?
npm ERR! build
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Dev-15\AppData\Roaming\npm-cache\_logs\2018-09-19T09_51_05_294Z-debug.log
PS: Works fine in a normal ng generated project
Expected behavior
The installation should not return error. And we should be able to run
npm run build:prod
npm run server
Minimal reproduction of the problem with instructions
- Install ngx client by following steps here: https://github.com/ngx-rocket/generator-ngx-rocket/tree/master/cli
- Create a new project
- Within the new project try installing ng-toolkit
- It should return an error saying app.module.ts is not found, even though it is there.
Example repository
Demo PWA: https://github.com/vinayg-cp/demo-pwa.git
What is the motivation / use case for changing the behavior?
Need to make an ngx based project more SEO friendly.
Environment
Angular CLI: 6.1.5
Node: 8.11.4
OS: win32 x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-optimizer 0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core 0.7.5
@angular-devkit/schematics 0.7.5
@angular/cli 6.1.5
@ngtools/webpack 6.1.5
@schematics/angular 0.7.5
@schematics/update 0.7.5
rxjs 6.3.2
typescript 2.9.2
webpack 4.9.2
Others:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Angular Universal "Module file (/src/app/.ts) not found"
This is the only error I am getting, making it very difficult to know where to start. I do not find any similar...
Read more >ng add fails to find app.module.ts when using custom tsconfig ...
Repository all set up to reproduce this error is available here. Just clone and type ng add @angular/material . The log given by...
Read more >Launching your app with a root module - Angular
In a situation where you want to bootstrap a component based on an API response, or you want to mount the AppComponent in...
Read more >Cannot find module '@angular/core' error | bobbyhadz
To solve the error "Cannot find module '@angular/core'", make sure you have installed all dependencies by running the npm install command, set the...
Read more >Angular Modules and NgModule - Complete Guide
So we can see here that an Angular module is used to group an ... So why does this work in the application...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@steebchen Closed as the original post was too old and also there is a new version available at npm. If you still have a issue, I would recommend opening a new issue with reproduction steps or a sample repo to look at.
I am working right now on the next release (#745) and I do wish to fix most common issues with these packages.
Cheers!
@KingDarBoja Why did you close this issue?