Comments (7)
try
npm clean-install
after upgrading you npm version to 10. It worked for me and fixed the issue.
from pug-loader.
I was getting the same error when using ng-cli-pug-loader. The issue is with the file ng-add-pug-loader.js produced by the ng CLI schematics. The file runs on npm postinstall and adds an extra rule to the webpack common.js file.
The solution is to replace the following line in ng-add-pug-loader.js right after running ng add ng-cli-pug-loader
:
const pugRules = ' { test: /\.(pug|jade)$/, exclude: /\.(include|partial)\.(pug|jade)$/, use: [ { loader: "apply-loader" }, { loader: "pug-loader" } ] }, { test: /\.(include|partial)\.(pug|jade)$/, loader: "pug-loader" },';
with:
const pugRules = ' { test: /\\.(pug|jade)$/, exclude: /\\.(include|partial)\\.(pug|jade)$/, use: [ { loader: "apply-loader" }, { loader: "pug-loader" } ] }, { test: /\\.(include|partial)\\.(pug|jade)$/, loader: "pug-loader" },';
(note the additional escaping)
Version info:
Angular CLI: 9.1.1
Node: 13.12.0
Angular: 9.1.1
from pug-loader.
Upgrading to node 10.6 solved this problem.
from pug-loader.
I'm using node 10.15.3. But getting same error.
from pug-loader.
I'm using node 10.15.3. But getting same error.
Try downgrading to 10.6 if you could.
from pug-loader.
same issue here with vue/cli
on [email protected]
which i got
<module class='export'>
<!-- ANY TAGs... -->
</module>
from pug-loader.
@alexprykhodko Thank you!
Just gonna add something: after replacing the config string, you have to make sure that this file:
node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/common.js
contains new, fixed config too, either by fixing it manually or reinstalling dependencies.
from pug-loader.
Related Issues (20)
- require a variable HOT 2
- “include” correctly imports content, but “extends/block” yields no content or errors HOT 1
- Can't get some Mixins correctly loaded: Empty mixins
- Interpolation not working
- how to remove comments in pug template?
- Can not use require with variable in mixin HOT 6
- 'Module not found: Error: Can't resolve` when use a mixin and require on same file HOT 3
- Is this package still being maintained? HOT 43
- any support for webpack-4 or webpack-5 HOT 6
- warning " > [email protected]" has incorrect peer dependency "pug@^2.0.0". HOT 6
- Unbuffered Code Issue with variables declared at beginning of pug template when using loader HOT 3
- Raise error manually
- Angular 11 postinstal script error(solution)
- Includes and or mixins sometimes do not trigger changes in parents while watching HOT 1
- Pug > 3, pug-loader error. HOT 3
- pug-loader no longer maintained? HOT 1
- esbuild alternative HOT 4
- load a CSS file in pug file HOT 6
- Npm Audit report HOT 4
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 pug-loader.