Comments (21)
npm clean-install
worked for me and fixed the issue.
from ng-cli-pug-loader.
For me deleting the package for the commonCli config and then doing an npm install worked.
Apparently the old pug loader script changes were messing with the new one and it wasn't working correctly.
from ng-cli-pug-loader.
I have not tested it in Angular 7.
If someone else could report this I'd be more than happy!
from ng-cli-pug-loader.
Trying to update to Angular 7 and now seem to have an issue with pug files. On load the templates return 404 errors.
Assuming this would be an issue with CLI changes and the updates cli pug loader does to the webpack config during post install.
Anyone tried a Angular 7 update yet and have any pointers?
experiencing the same thing.
from ng-cli-pug-loader.
@danguilherme yeah would be super awesome. Happy to help if needed. Currently starting to come into some dependency issues and an upgrade to 7 would be really helpful :)
from ng-cli-pug-loader.
I tried to use library with my Angular 7 application. It works wine with JiT, but does not work with AoT. The project does not start, compiler does not report any problem it just stops building. It looks like process is killed by the system.
However when I put it into newly created project it works just fine.
from ng-cli-pug-loader.
I would be very happy to accept a PR!
Apparently not even Angular 8 is supported by this version. Will have to check, can't compromise with time now.
However when I put it into newly created project it works just fine.
Could you elaborate on that?
You migrated your application from Angular 6 to 7, and the app does not work on AoT mode, but if you add the package on a newly created app (with v7), it works in both AoT and JiT?
from ng-cli-pug-loader.
I have a different problem on Angular7 with ionic4 and fixed in a workaround.
I've install pug-loader when the ionic serve
(actually wrap ng serve) started and it success, but restart the ionic serve
the pug file can not recognized any more.
I think the reproduce steps are:
The init state is 1. Install ionic globally and launch a new ionic project server. 2. which ng
return not found.
Then I have to install angular-cli globally to have ng
command to install the pug loader. At current state, I can use pug in previous launched server.
Then I restart the ionic server and it alerts pug file is not recognized.
I finally realize the pug loader add rules to local lib. Without angular-cli installed globally, ionic will run ng from local, but if the angular-cli installed, ionic will call ng from global. And ng serve
from global doesn't have the rule inserted.
So in my case I uninstall angular-cli from global and the ionic serve
works with pug template again.
Hope this case can help others too.
from ng-cli-pug-loader.
Great finding @raykin, thanks for sharing!
If I'm not mistaken, Angular CLI shows a warning when we're using a global installed ng
instead of a local one - which means that the solution you described is the recommended way.
Maybe Ionic server just swallows that warning.
from ng-cli-pug-loader.
FYI, I was on Angular 7 (upgraded from Angular 6) without any issues.
from ng-cli-pug-loader.
Angular 8 is not working properly even after new update.
It gives this error on the console
Uncaught Error: Template parse errors:
'module' is not a known element:
1. If 'module' is an Angular component, then verify that it is part of this module.
2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
Any ideas on how to fix it?
from ng-cli-pug-loader.
from ng-cli-pug-loader.
I tried npm install, it runs the post install script but the same error pops up after I run ng serve.
I also tried to npm uninstall the module as it doesn't update the ng-add-pug-loader.js script when you install the latest version, even after making sure I had the latest version installed, the correct script and doing npm install I still get the same error.
from ng-cli-pug-loader.
from ng-cli-pug-loader.
from ng-cli-pug-loader.
from ng-cli-pug-loader.
Using node 10.16 here and still getting the same error on Angular 8. Any solutions found for this?
from ng-cli-pug-loader.
I got node 10.16.
- If I create a new Angular 8 project, it works fine.
- If I upgrade just the ng-cli-pug-loader on my angular 7 project it stops working and gives back the prior 'module' is not a known element error.
- If I upgrade existing project to Angular 8 and upgrade ng-cli-pug-loader it errors out as well.
from ng-cli-pug-loader.
@gabynevada What was the package you deleted? Currently running into the "'module' is not a known element:" on an Angular 8 project that has been updated from 7.
from ng-cli-pug-loader.
@gabynevada Never mind. A clean npm i sorted it for me.
from ng-cli-pug-loader.
This project is no longer maintained. Check out ngx-pug-builders to add support to pug files to the latest versions of Angular.
from ng-cli-pug-loader.
Related Issues (20)
- Angular 8 HOT 6
- Question: How does this package work? Is it based off of angular-cli documentation? HOT 2
- Angular 8 mixed pug and html - file type not supported HOT 6
- Create a contributing guide
- After Angular 8 Update, Pug renders text only HOT 10
- Clean up dependencies
- Attributes converted to lowercase HOT 2
- Angular (7) component accepts only html files but does not support htm file HOT 1
- v0.2.2 has wrong NPM dependencies HOT 4
- Angular 9 ng serve with aot does not recompile pug to html after first time HOT 11
- [Feature Request] Support Integration of pug-plugin-ng HOT 1
- Pug support inside angular libraries HOT 3
- Double rules in webpack-configs/common.js HOT 1
- ERROR in Module parse failed: Unexpected token (1:0) HOT 6
- Problems with Angular 10 HOT 1
- Angular 11 updated common.js and typescript.js locations HOT 10
- Angular 11 brand-new project issues HOT 18
- Angular CLI and builder webpack config paths changed HOT 1
- ...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-cli-pug-loader.