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

Does not provided named default #342

Open
fredski02 opened this issue Jun 21, 2023 · 14 comments
Open

Does not provided named default #342

fredski02 opened this issue Jun 21, 2023 · 14 comments

Comments

@fredski02
Copy link

fredski02 commented Jun 21, 2023

I followed the guide exactly from here https://nuxt.com/modules/logrocket

my node version is : 16.20.0
my nuxt version is 3.3.1
my nuxt-logrocket version is 2.0.6

nuxt.config.ts

  modules: [
    'nuxt-logrocket',
 ] 
 ...
  logRocket: {
    id: `NUXT_LOG_ROW`,
    dev: true
  },

In my browser, i get the following error

caught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/logrocket@4.0.3/node_modules/logrocket/dist/build.umd.js?v=d10ca332' does not provide an export named 'default' (at plugin.client.mjs:1:1)
@farzadso
Copy link
Collaborator

@Atinux Since you had the same issue on nuxt tailwind, I was wondering if you could point me in the right direction as I couldn't find any commits that fixed this issue.

@Atinux
Copy link
Contributor

Atinux commented Jun 27, 2023

I guess @ineshbose could help

@camille500
Copy link

Having the same issue

@ineshbose
Copy link

@farzadso I tried to investigate this issue (coming from client plugin) but can't say for fix. Do you know what exact issue you are referring to from the Tailwind module? (I am unable to recall)

@farzadso
Copy link
Collaborator

farzadso commented Jul 7, 2023

@ineshbose The only relevant discussion I found was this : nuxt/nuxt#13247

Hope it rings some bells.

@ineshbose
Copy link

@ineshbose The only relevant discussion I found was this : nuxt/nuxt#13247

Hope it rings some bells.

Oh this was because we weren't bundling a dependency with the module (was added to unbuild.externals) and we anyway switched dependency. So it wasn't related.. (let me continue going through the discussion and experimenting in Stackblitz)

@farzadso
Copy link
Collaborator

farzadso commented Jul 7, 2023

@ineshbose The only relevant discussion I found was this : nuxt/nuxt#13247
Hope it rings some bells.

Oh this was because we weren't bundling a dependency with the module (was added to unbuild.externals) and we anyway switched dependency. So it wasn't related.. (let me continue going through the discussion and experimenting in Stackblitz)

Yeah, I went through the commits and didn't find anything related.

Much appreciated.

@dolbex
Copy link

dolbex commented Jul 19, 2023

@farzadso any luck with this issue - we'd love to try working with Logrocket but cannot seem to get past this issue.

@Me-Phew
Copy link

Me-Phew commented Jul 20, 2023

Do you think this issue could be related?

@farzadso
Copy link
Collaborator

@Me-Phew I upgrade nuxt to 3.6.5 and the issue still exists.

@ineshbose
Copy link

@farzadso would we be able to add logrocket to imports like so:

addImports({
      name: 'default',
      as: 'logRocket',
      from: 'logrocket'
})

and then in the plugin use:

import { logRocket } from '#imports'

I tried it on the repo playground but probably not testing properly.

@farzadso
Copy link
Collaborator

@ineshbose Can you give me a link to your playground please?

@ineshbose
Copy link

Closed the tab... it was just the repo opened on Stackblitz with the above change!

@farzadso
Copy link
Collaborator

@ineshbose Even adding your proposed changes doesn't fix it. You can see the changes on v2.0.9.

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

7 participants