Skip to content

Getting error: You may need an additional loader #20471

Closed

Description

@csname1910

I am getting the following error.

You can reproduce it with this minimal GitHub repository:

https://github.com/csname1910/errordemo

Error: ./node_modules/pdfjs-dist/build/pdf.js 2413:45
Module parse failed: Unexpected token (2413:45)
File was processed with these loaders:
 * ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js
 * ./node_modules/@ngtools/webpack/src/ivy/index.js
You may need an additional loader to handle the result of these loaders.
|         intent: renderingIntent,
|         renderInteractiveForms: renderInteractiveForms === true,
>         annotationStorage: annotationStorage?.getAll() || null
|       });
|     }

Activity

  1. transferred this issue fromangular/angularon Apr 8, 2021
  2. JoostK commented on Apr 8, 2021

    @JoostK
    Member

    Heya, the optional chaining syntax is not supported by Webpack 4, see webpack/webpack#10227, and that is used in the Angular CLI. Support for Webpack 5 is currently experimental in Angular CLI 11.

  3. alan-agius4 commented on Apr 8, 2021

    @alan-agius4
    Collaborator

    Indeed as @JoostK mentioned the optional chaining is not support by Webpack 4 which is used in the Angular CLI 11, to opt-in using experimental support for Webpack 5 which is not recommended to be used for production. See: #18820.

    In version 12, the Angular CLI will use Webpack 5 which does support the mentioned syntax see: #20466

  4. angular-automatic-lock-bot commented on May 9, 2021

    @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 May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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