Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Can't resolve 'core-js/features/array/flat' #1481

Closed
stevez86 opened this issue Aug 21, 2019 · 3 comments
Closed

Module not found: Can't resolve 'core-js/features/array/flat' #1481

stevez86 opened this issue Aug 21, 2019 · 3 comments

Comments

@stevez86
Copy link

Intended outcome:

Trying to install/run a serverless app using apollo-server-micro with nextjs.

Actual outcome:

When deploying to now using nextjsand apollo-server-micro v2.8.2, I get this error in apollo-env.

Failed to compile.
./node_modules/apollo-env/lib/polyfills/array.js
Module not found: Can't resolve 'core-js/features/array/flat' in '/tmp/4c43eb70/node_modules/apollo-env/lib/polyfills'

I tried just about every work-around I could find. Here are some other possibly related issues:

apollographql/apollo-server#2263
#962

How to reproduce the issue:

Here's a snippet of my package.json

"dependencies": {
    "@apollo/react-hooks": "^3.0.0",
    "@apollo/react-ssr": "^3.0.0",
    "apollo-cache-inmemory": "^1.6.2",
    "apollo-client": "^2.6.3",
    "apollo-link": "^1.2.12",
    "apollo-link-error": "^1.1.11",
    "apollo-link-http": "^1.5.15",
    "apollo-link-logger": "^1.2.3",
    "apollo-link-persisted-queries": "^0.2.2",
    "apollo-link-timeout": "^1.3.1",
    "apollo-server-micro": "^2.8.2",
    "core-js": "3.2.1",
    "graphql": "^14.4.2",
    "graphql-middleware": "^4.0.0",
    "graphql-shield": "^6.0.4",
    "graphql-tools": "^4.0.5",
    "nanoid": "^2.0.3",
    "next": "^9.0.4",
    "react": "^16.9.0",
    "react-dom": "^16.9.0",
    "react-swipeable-views": "^0.13.3",
  },
  "devDependencies": {
    "@babel/node": "^7.5.5",
    "@babel/plugin-transform-react-constant-elements": "^7.5.0",
    "@babel/plugin-transform-react-inline-elements": "^7.2.0",
    "babel-eslint": "^10.0.2",
    "babel-plugin-transform-imports": "^2.0.0",
    "css-loader": "^3.2.0",
    "eslint": "5",
    "eslint-config-airbnb": "^18.0.1",
    "eslint-config-prettier": "^6.0.0",
    "eslint-import-resolver-webpack": "^0.11.1",
    "eslint-plugin-import": "^2.18.2",
    "eslint-plugin-jsx-a11y": "^6.2.3",
    "eslint-plugin-prettier": "^3.1.0",
    "eslint-plugin-react": "^7.14.3",
    "eslint-plugin-react-hooks": "^1.6.1",
  },

if I should be posting this elsewhere, please let me know.

@stevez86
Copy link
Author

False alarm, it was webpack config issue for me.

@robbyemmert
Copy link

What webpack issue? @stevez86

@aaronleesmith
Copy link

There's a disappointing lack of information on this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants