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

require() of ES Module #658

Open
dubbs opened this issue Jul 19, 2023 · 1 comment
Open

require() of ES Module #658

dubbs opened this issue Jul 19, 2023 · 1 comment
Labels
bug Something isn't working module: druxt Related to the `druxt` module

Comments

@dubbs
Copy link

dubbs commented Jul 19, 2023

Describe the bug
After installing the druxt-site module and running the Nuxt dev server, the following error occurs:

require() of ES Module /node_modules/axios/index.js from /node_modules/vue-server-renderer/build.dev.js not supported. Instead change the require of index.js in /node_modules/vue-server-renderer/build.dev.js to a dynamic import() which is available in all CommonJS modules.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://druxtjs.org/modules/site/getting-started
  2. Follow Nuxt installation instructions
  3. Start the Nuxt dev server
  4. See error

Your Environment (please complete the following information):

  • OS: macOS Ventura 13.2
  • Browser: Chrome
  • Version: 114

Additional context
As a temporary fix, add this to your nuxt.config.js:

build: {
  transpile: [
    'axios'
  ]
}
@Decipher Decipher added module: druxt Related to the `druxt` module bug Something isn't working labels Jul 25, 2023
@Decipher
Copy link
Member

Thanks for bringing this issue and solution to my attention. I will look further into this in an upcoming sprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module: druxt Related to the `druxt` module
Projects
None yet
Development

No branches or pull requests

2 participants