Skip to content

broken when upgrade to angular v6 #761

Closed
@goldenbearkin

Description

@goldenbearkin

Do you want to request a feature or report a bug?
bug

What is the current behavior?
broken with following error message

ERROR in ./node_modules/graphql/index.mjs
2:0-49 Can't reexport the named export 'graphql' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/graphql/index.mjs
2:0-49 Can't reexport the named export 'graphqlSync' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/graphql/index.mjs
39:0-61:50 Can't reexport the named export 'DEFAULT_DEPRECATION_REASON' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/graphql/index.mjs
39:0-61:50 Can't reexport the named export 'GraphQLBoolean' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/graphql/index.mjs
39:0-61:50 Can't reexport the named export 'GraphQLDeprecatedDirective' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/graphql/index.mjs
39:0-61:50 Can't reexport the named export 'GraphQLDirective' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/graphql/index.mjs
39:0-61:50 Can't reexport the named export 'GraphQLEnumType' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/graphql/index.mjs
39:0-61:50 Can't reexport the named export 'GraphQLFloat' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/graphql/index.mjs
39:0-61:50 Can't reexport the named export 'GraphQLID' from non EcmaScript module (only default export is available)
...

Steps to reproduce:

  1. ng new test-amplify (Angular CLI: 6.0.0-rc.7)
  2. yarn add @angular/cli@next
  3. ng update @angular/cli --migrate-only --from=1.7.0
  4. ng update rxjs --force
  5. ng update @angular/core --next --force
  6. yarn add [email protected]
  7. add below to tsconfig.app.json
"compilerOptions": {
    "types" : ["node"]
}
  1. add below to tsconfig.json
"lib": [
      "es2017",
      "dom",
      "esnext.asynciterable"
    ]
  1. add below to main.ts
// ...
import Amplify from 'aws-amplify';
Amplify.configure({});
// ...
  1. ng serve

What is the expected behavior?
No error

below is package.json

{
  "name": "test-amplify",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "6.0.0-rc.6",
    "@angular/common": "6.0.0-rc.6",
    "@angular/compiler": "6.0.0-rc.6",
    "@angular/core": "6.0.0-rc.6",
    "@angular/forms": "6.0.0-rc.6",
    "@angular/http": "6.0.0-rc.6",
    "@angular/platform-browser": "6.0.0-rc.6",
    "@angular/platform-browser-dynamic": "6.0.0-rc.6",
    "@angular/router": "6.0.0-rc.6",
    "apollo-boost": "^0.1.4",
    "aws-amplify": "^0.3.3",
    "aws-amplify-angular": "^0.1.0",
    "core-js": "^2.4.1",
    "graphql": "^0.13.2",
    "graphql-tag": "^2.9.1",
    "rxjs": "6.0.0",
    "rxjs-compat": "^6.0.0-rc.0",
    "zone.js": "^0.8.19"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.5.8",
    "@angular/cli": "^6.0.0-rc.7",
    "@angular/compiler-cli": "6.0.0-rc.6",
    "@angular/language-service": "6.0.0-rc.6",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "2.7.2"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildRelated to build issuesbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions