Skip to content

ng test/build fail after "ng new" with project name "webpack"  #22902

Closed

Description

@DaveO-Home

Which @angular/* package(s) are the source of the bug?

compiler-cli

Is this a regression?

No

Description

After scaffolding a new project with the project name "webpack" commands like ng test and ng build fail. Process:

ng new
? What name would you like to use for the new workspace and initial project? webpack
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS

Please provide a link to a minimal reproduction of the bug

none

Please provide the exception or error you saw

ng test
✔ Browser application bundle generation complete.

./src/test.ts:10:8 - Error: Module parse failed: Unexpected token (10:8)
File was processed with these loaders:
 * ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js
You may need an additional loader to handle the result of these loaders.
| } from '@angular/platform-browser-dynamic/testing';
| 
> declare const require: {
|   context(path: string, deep?: boolean, filter?: RegExp): {
|     <T>(id: string): T;

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 13.3.0
Node: 16.14.0
Package Manager: npm 8.5.1
OS: linux x64

Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1303.0
@angular-devkit/core         13.3.0
@angular-devkit/schematics   13.3.0
@schematics/angular          13.3.0

Anything else?

No response

Activity

  1. transferred this issue fromangular/angularon Mar 28, 2022
  2. modified the milestone: Backlog on Mar 28, 2022
  3. added 2 commits that reference this issue on Mar 30, 2022
    371da23
    293526c
  4. angular-automatic-lock-bot commented on Apr 30, 2022

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions