Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

'__spreadArrays' was not found #1264

Open
kidroca opened this issue Apr 10, 2020 · 0 comments
Open

'__spreadArrays' was not found #1264

kidroca opened this issue Apr 10, 2020 · 0 comments

Comments

@kidroca
Copy link

kidroca commented Apr 10, 2020

Expected Behavior
Bundling with webpack - importing and using the library works

Actual Behavior
An uncaught exception occurs:

WARNING in ../node_modules/apollo-utilities/lib/bundle.esm.js 569:66-80 "export '__spreadArrays' was not found in 'tslib'

A simple reproduction

  1. Have "apollo-link": "1.2.14" in package.json
  2. Bundle the app with webpack
  3. See the above error

Full Stack

WARNING in ../node_modules/apollo-utilities/lib/bundle.esm.js 569:66-80
"export '__spreadArrays' was not found in 'tslib'
    at HarmonyImportSpecifierDependency._getErrors (/mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11)
    at HarmonyImportSpecifierDependency.getWarnings (/mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15)
    at Compilation.reportDependencyErrorsAndWarnings (/mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/lib/Compilation.js:1454:24)
    at /mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/lib/Compilation.js:1258:10
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:20:1)
    at AsyncSeriesHook.lazyCompileHook (/mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)
    at Compilation.finish (/mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/lib/Compilation.js:1253:28)
    at /mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/lib/Compiler.js:672:17
    at _done (eval at create (/mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
    at eval (eval at create (/mnt/d/Repositories/diasyst/diasyst-fe/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:42:22)
 @ ../node_modules/apollo-link/lib/bundle.esm.js
 @ ./common/graphQL/apollo.service.js
 @ ./common/graphQL/index.js
 @ ./common/api/index.js
 @ ./common sync ^((?!spec\.).)*\.(?:js|less)$
 @ ./main.js
 @ ./launcher.js

Related packages

"@babel/core": "^7.8.3",
"webpack": "^4.42.1",
"babel-loader": "^8.0.6",
"@apollo/react-hooks": "^3.1.4",
"apollo-cache-inmemory": "^1.6.5",
"apollo-client": "^2.6.8",
"apollo-link": "^1.2.14",
"apollo-link-context": "^1.0.20",
"apollo-link-http": "^1.5.17"

Reverting the packages back to their previous versions and the error is no longer happening

  • I've checked out the package-lock.json from before the install
"@babel/core": "^7.8.3",
"webpack": "^4.42.1",
"babel-loader": "^8.0.6",
"@apollo/react-hooks": "^3.1.3",
"apollo-cache-inmemory": "^1.6.3",
"apollo-client": "^2.6.4",
"apollo-link": "^1.2.13",
"apollo-link-context": "^1.0.19",
"apollo-link-http": "^1.5.16"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant