Giter Site home page Giter Site logo

ERROR in Error: Child compilation failed: Module build failed: Error: The path for file doesn't contain relativeTo param about ngtemplate-loader HOT 6 OPEN

wearymonkey avatar wearymonkey commented on June 30, 2024 11
ERROR in Error: Child compilation failed: Module build failed: Error: The path for file doesn't contain relativeTo param

from ngtemplate-loader.

Comments (6)

nickbreaton avatar nickbreaton commented on June 30, 2024 3

Not sure if this is the original issue, but for me my test for /\.html/ was also picking my index.html file from my html-webpack-plugin. Putting an exclude: /index.html/ did it for me. You may have to adjust the exclude if you have other files names index.html, but the basic gist is:

module.exports = {
  ...
  module: {
    rules: [
      {
        exclude: /index\.html/,
        test: /\.html$/,
        use: [
          {
            loader: 'ngtemplate-loader',
            options: {
              relativeTo: './src'
            }
          },
          { loader: 'html-loader' }
        ]
      }
    ]
  },
  ...
}

from ngtemplate-loader.

Vitenok avatar Vitenok commented on June 30, 2024

Hi @karthikdeva , have you solved this issue?

from ngtemplate-loader.

evankleist avatar evankleist commented on June 30, 2024

This seems to be a problem with the combination of this loader and HtmlWebpackPlugin. The index file used by HtmlWebpackPlugin throws errors unless it is excluded, as @nickbreaton pointed out. However, excluding index.html means that any references in that file will not be required.

from ngtemplate-loader.

moonformeli avatar moonformeli commented on June 30, 2024

@nickbreaton It worked for me, thanks!

from ngtemplate-loader.

dikaso avatar dikaso commented on June 30, 2024

Is this maybe only windows problem?

from ngtemplate-loader.

DostalTomas avatar DostalTomas commented on June 30, 2024

No, I have linux and experiencing same issue.

from ngtemplate-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.