question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yarn build/start import @apollo/client/core/core.cjs.js?

See original GitHub issue

Environment


  • Operating System: Darwin
  • Node Version: v16.13.0
  • Nuxt Version: 3.0.0-27276275.abfbd2f
  • Package Manager: yarn@1.22.15
  • Bundler: Vite
  • User Config: build
  • Runtime Modules: -
  • Build Modules: -

Describe the bug

yarn build yarn start

Reproduction

https://github.com/productdevbook/productdevbook.com

Additional context

No response

Logs

➜  productdevbook.com git:(main) yarn start
yarn run v1.22.15
$ node .output/server/index.mjs
Listening on http://localhost:3000
Directory import '/Users/productdevbook/Documents/GitHub/productdevbook.com/.output/server/node_modules/@apollo/client/core' is not supported resolving ES modules imported from /Users/productdevbook/Documents/GitHub/productdevbook.com/.output/server/chunks/app/server.mjs
Did you mean to import @apollo/client/core/core.cjs.js?
  at new NodeError (node:internal/errors:371:5)  
  at finalizeResolution (node:internal/modules/esm/resolve:412:17)  
  at moduleResolve (node:internal/modules/esm/resolve:932:10)  
  at defaultResolve (node:internal/modules/esm/resolve:1044:11)  
  at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)  
  at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)  
  at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)  
  at link (node:internal/modules/esm/module_job:75:36)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

0reactions
gookyncommented, Apr 26, 2022

Hi, I have the same problem, have you solved it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn build/start import @apollo/client/core/core.cjs.js? #9048
js extension if you are using core.cjs.js Example import ApolloClientCore from '@apollo/client/core/core.cjs.js'; => import ApolloClientCore ...
Read more >
Cannot run next.js app. It shows weird error - Stack Overflow
It's possible your Next configuration file isn't included and some values (environment variables for example) aren't readable for your project.
Read more >
rollup.js
This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project....
Read more >
Building for Production - Vite
JS -imported asset URLs, CSS url() references, and asset references in your ... be called at buildStart for build watch mode to work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found