Skip to content

Cannot find name 'require'. using relative paths... #2221

@born2net

Description

@born2net

I am using a config with relative paths for style and template:

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent {
    title = 'app works...!';
    ...

and getting an error of

Time: 3117ms
            Asset     Size  Chunks       Chunk Names
   main.bundle.js  4.62 MB    0, 3       main
scripts.bundle.js   330 kB    1, 3       scripts
 styles.bundle.js  10.2 kB    2, 3       styles
        inline.js  5.53 kB       3       inline
         main.map  5.04 MB    0, 3       main
      scripts.map   413 kB    1, 3       scripts
       styles.map    14 kB    2, 3       styles
       inline.map  5.59 kB       3       inline

ERROR in [default] C:\msweb\ng2Boilerplate\src\app\app.component.ts:45:14
Cannot find name 'require'.

ERROR in [default] C:\msweb\ng2Boilerplate\src\app\app.component.ts:46:13
Cannot find name 'require'.
Child html-webpack-plugin for "index.html":
         Asset    Size  Chunks       Chunk Names
    index.html  3.3 kB       0
webpack: bundle is now VALID.

running:

angular-cli: 1.0.0-beta.14
node: 6.5.0
os: win32 x64

regards

Sean

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions