Skip to content

Identifier 'Ajv' has already been declared while migrating to Angular6  #281

Description

@vatsalpande

Issue type

I'm submitting a (check one):
[x] Bug report
[ ] Feature request
[ ] Regression (something that used to work, but stopped working in a newer version)
[ ] Support request
[ ] Documentation issue or request

Prerequisites

Before posting, make sure you do the following (check all):
[x] Confirm you are using the latest versions of all necessary packages (or if not, explain why not)
[x] Search GitHub for a similar issue or PR

Current behavior

While running ng serve below error is being thrown

ERROR in ./node_modules/angular2-json-schema-form/angular2-json-schema-form.es5.js
Module parse failed: Identifier 'Ajv' has already been declared (7:12)
You may need an appropriate loader to handle this file type.

On checking angular2-json-schema-form.es5.js - there are two entries for
import * as Ajv from 'ajv';

If one of the entry is removed manually, this error goes away

Expected behavior

No error should be thrown while building the project

IMPORTANT: How can we reproduce your problem?

Just include angular2-json-schema-form in a newly configured angular cli project and run ng serve

Environment

OS name & version: macOS Sierra
Browser name & version:
Angular version: 6
Angular JSON Schema Form version(s): ^0.7.0-alpha.1

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions