Giter Club home page Giter Club logo

Comments (7)

David-van-der-Sluijs avatar David-van-der-Sluijs commented on September 27, 2024 7

try

npm clean-install

after upgrading you npm version to 10. It worked for me and fixed the issue.

from pug-loader.

alexprykhodko avatar alexprykhodko commented on September 27, 2024 1

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.

kpambid avatar kpambid commented on September 27, 2024

Upgrading to node 10.6 solved this problem.

from pug-loader.

kiseyob avatar kiseyob commented on September 27, 2024

I'm using node 10.15.3. But getting same error.

from pug-loader.

kpambid avatar kpambid commented on September 27, 2024

I'm using node 10.15.3. But getting same error.

Try downgrading to 10.6 if you could.

from pug-loader.

cdll avatar cdll commented on September 27, 2024

same issue here with vue/cli on [email protected] which i got

<module class='export'>
  <!-- ANY TAGs... -->
</module>

from pug-loader.

autaut03 avatar autaut03 commented on September 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.