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

Problems with NUXT3 #2056

Open
SebastienCaunes opened this issue Dec 6, 2023 · 3 comments
Open

Problems with NUXT3 #2056

SebastienCaunes opened this issue Dec 6, 2023 · 3 comments

Comments

@SebastienCaunes
Copy link

When I use paper in a NUXT 3 component I have the following bug:

[Vue Router warn]: uncaught error during route navigation:
Error: Cannot find module './node/self.js'

So I went to the source code of paper-full.js and had to change the line 35
self = self || require('./node/self.js');

by

self = self || require('paper/dist/node/self.js');

Then I had to do the same for extend.js further down.

Description/Steps to reproduce

Import paper in a dynamically loaded nuxt3 component it works fine the first time, then if you navigate in some pages and come back you get an error 500 defined above

Additional information

Sorry I'm not a javascript nor nuxt3 guru and I don't understand what's wrong
Just want to report it as I lost time to find this bug and if it could be avoided for others it's fine.

thanks for this work tho

@SebastienCaunes
Copy link
Author

I tried to setup a new project and the problem disappeared ...

@SebastienCaunes
Copy link
Author

The problem is there again in my new project. It's driving me crazy

If I go directly to the page where the paper is instantiated I got the error (http://localhost:3000/configurator). If I go to home dir first then navigate to the page, it works.

@SebastienCaunes
Copy link
Author

I found that this error is due to server side rendering.
When I put ssr: false, in nuxt config file. Everything works fine.

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

1 participant