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

Undefined #3

Open
jameswragg opened this issue Jan 11, 2017 · 19 comments
Open

Undefined #3

jameswragg opened this issue Jan 11, 2017 · 19 comments

Comments

@jameswragg
Copy link

Trying to implement the example & getting a simple undefined as the output in the browser.

Inspecting the DOM I can see:

<div class="atwho-wrap"><!----> undefined</div>
@jameswragg
Copy link
Author

(Vue v2.1.8)

@fritx
Copy link
Owner

fritx commented Jan 12, 2017

Ah.. 😕
Could you post your example code?

I guess it's about the <slot>? Maybe the undefined is output by the slot part.
Did you pass any slot inside <at>? 😕

@jameswragg
Copy link
Author

I just copied this example from the readme into a At.vue file in my project:

<template>
  <at :members="members">
    <div contenteditable></div>
  </at>
</template>

<script>
import At from 'vue-at'

export default {
  components: { At },
  data () {
    return {
      members: ['Roxie Miles', 'grace.carroll', '小浩']
    }
  }
}
</script>

Then implemented in my project with:

<template>
 <div>
   ...other markup...
   <at-editor></at-editor>
 </div>
</template>
<script>
import AtEditor from './AtEditor.vue'
export default {
    components: {
        AtEditor,
        ...
<script>

@fritx
Copy link
Owner

fritx commented Jan 12, 2017

@jameswragg thanks for your reporting!

When I upgraded vue from 2.1.6 to 2.1.8, the bug occurs too.
I found a related issue: vuejs/vue#4581

While they said the patch has been included in 2.1.8, we still have the problem 😕
You could rollback to 2.1.6 and wait for some new fix.
wffranco/vue-strap#32 (comment)

@bukinoshita
Copy link

I'm getting this too 😢

@0xDing
Copy link

0xDing commented Feb 9, 2017

The bug seems persisted in 2.1.10 🤕

@0xDing
Copy link

0xDing commented Feb 9, 2017

just need rebuild

    // It's work.
    import At from 'vue-at/src/At.vue'

@fritx
Copy link
Owner

fritx commented Feb 10, 2017

@borisding1994 Oh, god, I should rebuild the package to republish??
I didn't know. I was thinking that it was Vue that should do updates.

@fritx
Copy link
Owner

fritx commented Feb 10, 2017

I'm getting this too 😢

@bukinoshita it's a sad story, let me fix the bug arround.

It's work.

@borisding1994 what's your exact Vue version when you find it to work?
Maybe I need to rebuild and publish.

@fritx
Copy link
Owner

fritx commented Feb 10, 2017

I've just published [email protected] with some bug fixes in Backlog(#2), actually it includes a new feature (custom template).

And it works fine with me, when vue is 2.1.6. 😥

@XavRsl
Copy link

XavRsl commented Mar 14, 2017

Hi @fritx !
Sorry but I still get the same error using 2.1.10. Is there anything I could do to make it work ?

Thanks

Xavier

@0xDing
Copy link

0xDing commented Mar 16, 2017

@fritx work at 2.1.10.

May be related to this:

Vue v2.1.7 Change logs
If you are the author of a plugin/component that ships a pre-compiled dist file:

It is recommended to re-compile the dist file using the latest versions of vue-template-compiler and vue-template-es2015-compiler. The new generated code is backwards-compatible, but code generated by older versions of the compilers may not work properly with the latest runtime.

Code generation changes that affect compatibility are very rare and we will avoid introducing similar changes in future patch releases.

fritx added a commit that referenced this issue Mar 18, 2017
“Everything became undefined after updating Vue to 2.1.7” - vue-material#251
@fritx
Copy link
Owner

fritx commented Mar 18, 2017

@borisding1994 thanks for pointing it out! nice!
I've managed to reproduce you guys' "undefined" problem,
and solved it by bumping the minor versions of vue loaders and compilers.

-    "vue-loader": "^10.0.0",
+    "vue-loader": "^10.3.0",
      "vue-style-loader": "^1.0.0",
-    "vue-template-compiler": "^2.1.0",
+    "vue-template-compiler": "^2.2.4",

Published as [email protected], please try it. 😄
If there is still problem, let me know ;)
then I would try to bump the major versions as well.

@seandearnaley
Copy link

I'm seeing this issue with the latest version of vue

"vue": "2.2.6",
"vue-loader": "^11.3.3",
"vue-template-compiler": "^2.2.6",

@fritx
Copy link
Owner

fritx commented Apr 4, 2017

@seandearnaley oh, I cant reproduce your issue.

My steps:

  1. bump dep versions as yours
-    "vue": "^2.1.0",
-    "vue-loader": "^10.3.0",
+    "vue": "^2.2.6",
+    "vue-loader": "^11.3.4",   <-- a little difference, never mind
     "vue-style-loader": "^1.0.0",
-    "vue-template-compiler": "^2.2.4",
+    "vue-template-compiler": "^2.2.6",
  1. remove node_modules and reinstall

  2. npm run build

  3. change App.vue to link to dist

-// import At from '../dist'
-import At from './At.vue'
+import At from '../dist'
+// import At from './At.vue'

5 . npm run dev and it works

I guess a automatically CI build is necessary in the future though ;)

@hugodias
Copy link

Same issue here:

"vue": "^2.2.6",
"vue-at": "2.x",
"vue-loader": "^11.3.4",
"vue-template-compiler": "^2.2.6",

Anyone was able to solve the problem?

@hugodias
Copy link

Solved. Had to use version 2.0.4

@fritx
Copy link
Owner

fritx commented Apr 26, 2017

Hi, 👍 but seems nothing big changed between 2.0.4 and 2.0.5 (latest).
Does vue-at 2.0.5 work with you or not?

@katranci
Copy link

I'm having the same issue in v2.0.5. Had to use v2.0.4.

@fritx fritx added the bug label May 26, 2017
fritx added a commit that referenced this issue Nov 6, 2017
“Everything became undefined after updating Vue to 2.1.7” - vue-material#251
@fritx fritx added the fixed label Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants