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

What is "/Users/jjuszczak/Projekte/Privat/" #33

Closed
sangdth opened this issue Feb 26, 2019 · 7 comments
Closed

What is "/Users/jjuszczak/Projekte/Privat/" #33

sangdth opened this issue Feb 26, 2019 · 7 comments

Comments

@sangdth
Copy link

sangdth commented Feb 26, 2019

Expected Behavior

No crash the Nuxt.

Actual Behavior

Show really strange error.

[Vue warn]: Error in beforeCreate hook: "ReferenceError: document is not defined"

found in

---> <Password> at /Users/jjuszczak/Projekte/Privat/vue-password-strength-meter/src/components/PasswordStrengthMeter.vue
       <ElFormItem> at packages/form/src/form-item.vue
         <ElForm> at packages/form/src/form.vue
           <SignUpForm> at pages/signup.vue
             <Nuxt>
               <ElMain> at packages/main/src/main.vue
                 <ElContainer> at packages/container/src/main.vue
                   <Blank> at layouts/blank.vue
                     <Root>

My user account is sangdth and I have no idea is that user jjuszczak

Environment

  • OS: Mac OS 10.14.3
  • NPM version: 6.8.0
  • vue.js version: Nuxtjs 2.4
  • vue-password-strength-meter version: 1.4.1
@sangdth
Copy link
Author

sangdth commented Feb 26, 2019

Found in your dist folder:
screenshot 2019-02-27 at 1 21 45

@apertureless
Copy link
Owner

It is actually my local path for the vue file. Seems that vue-loader might not strip it away for production. Will check the configs. Maybe I am missing a prod env somewhere.

However, this is totally unrelated to your issue / breaking. It is basically only for development purpose.

Your issue is that document is not available in the server side environment.

@sangdth
Copy link
Author

sangdth commented Feb 27, 2019

@apertureless Ah. I think because I'm using Nuxt.js with server-side rendering, which caused this trouble. I think I will try to find a solution. Btw your work is nice. Cheer.

@hartwm
Copy link

hartwm commented Dec 19, 2019

@apertureless Ah. I think because I'm using Nuxt.js with server-side rendering, which caused this trouble. I think I will try to find a solution. Btw your work is nice. Cheer.

did you ever find fix for this?

@sangdth
Copy link
Author

sangdth commented Dec 20, 2019

Sry I stop working on that project.

@apertureless
Copy link
Owner

@hartwm what issue are you running in?

If you run into document not defined issue, you should try the no-ssr or client-only component from nuxt. https://nuxtjs.org/api/components-client-only/

@guastallaigor
Copy link

I've manage to make it work using the <client-only> component in Nuxt.js.
Thank you.

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

4 participants