Skip to content

Cannot set property default of #<Object> which has only a getter #4843

Closed
@hmmhmmhm

Description

Intended outcome:

I just tried to import the apolo boost in a node js environment that uses typescript.

import {ApolloClient} from 'apollo-boost'

Actual outcome:

TypeError: Cannot set property default of #<Object> which has only a getter
    at Object.<anonymous> (h:\Private#2019\Project\_local\article-glow\core\node_modules\apollo-boost\lib\bundle.cjs.js:158:17)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (h:\Private#2019\Project\_local\article-glow\core\src\Backend\Sequence\After.ts:5:1)
    at Module._compile (internal/modules/cjs/loader.js:722:30)

How to reproduce the issue:

install apollo-boost and trying import

npm install --save apollo-boost

Versions

  System:
    OS: Windows 10
  Binaries:
    Node: 11.3.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.12.3 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 41.16299.15.0
  npmPackages:
    apollo-boost: ^0.4.0 => 0.4.0
    apollo-cache-inmemory: ^1.6.0 => 1.6.0
    apollo-link-http: ^1.5.14 => 1.5.14
    apollo-server: ^2.4.8 => 2.5.0
    apollo-server-express: ^2.4.8 => 2.5.0

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions