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

This package breaks the project #4

Open
magyarb opened this issue Feb 26, 2020 · 3 comments
Open

This package breaks the project #4

magyarb opened this issue Feb 26, 2020 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@magyarb
Copy link

magyarb commented Feb 26, 2020

After adding this package, the nuxt server stops working. Here's the error with the stack trace:

FATAL  The 'request' argument must be string. Received type undefined

  at node_modules\esm\esm.js:1:224803
  at Module.<anonymous> (node_modules\esm\esm.js:1:295892)
  at Resolver.n [as esm] (node_modules\esm\esm.js:1:279589)
  at Resolver.requireModule (node_modules\@nuxt\core\dist\core.js:569:31)
  at ModuleContainer.addModule (node_modules\@nuxt\core\dist\core.js:164:36)
  at promise.then (node_modules\@nuxt\utils\dist\utils.js:1802:43)

I'm using nuxt 2.11.0. This might be an issue with webpack configuration, but the solution is missing from the docs.

@gaelreyrol
Copy link
Contributor

Hello @magyarb ! Could you provide more context ? Options for example ?

@magyarb
Copy link
Author

magyarb commented Feb 27, 2020

I used the default

{
    writeKey: '',
    disabled: false,
    useRouter: true
  }

As esm is the package that throws the error, this was likely a problem with transpilation not configured properly.

Anyway, creating segment.js in plugins with the content

export default () => {
 //the code segment provided
}

and including in nuxt.config.js like:

plugins: [{src: '~/plugins/segment', mode: 'client'}]

works perfectly well. What additional value does this package provide over this solution?

@gaelreyrol
Copy link
Contributor

Thanks @magyarb ! I will try to work on this ASAP !

@gaelreyrol gaelreyrol added bug Something isn't working good first issue Good for newcomers labels Mar 3, 2020
@gaelreyrol gaelreyrol self-assigned this Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Development

No branches or pull requests

2 participants