handtrack.js icon indicating copy to clipboard operation
handtrack.js copied to clipboard

Cannot read property 'node' of undefined

Open jonasholfeld opened this issue 3 years ago • 2 comments

I have 2 different Vue projects wich both use handtrackjs. The components which use handtrackjs are identical. In the newer project i get the following error:

Uncaught (in promise) TypeError: Cannot read property 'node' of undefined at e.evaluateFeature (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250) at e.get (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250) at e.register (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250) at e.registerTensor (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250) at new e (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250) at Function.e.make (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250) at tensor (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250) at Module.tensor2d (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250) at eval (webpack-internal:///./node_modules/handtrackjs/src/index.js:131) at eval (webpack-internal:///./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js:250)

Whereas in the old project everything works as expected. Both projects use the same handtrackjs version + same Vue version. Is there any hint what might cause this behaviour?

jonasholfeld avatar Jan 07 '21 14:01 jonasholfeld

I have the same issue. Here is a component made quickly as test:

<template>
<canvas ref="canvas" style="background: green;"></canvas>
</template>
<script>
import Vue from 'vue';
import {
  Component
} from 'vue-property-decorator';
import * as handTrack from 'handtrackjs';

@Component({
  name: 'AirControl',
  data() {
    return {
      model: null
    };
  },
  async mounted() {
    this.model = await handTrack.load();
    console.log('model loaded');
  }
})
export default class AirControl extends Vue {}
</script>

Result: same error as the initial post. I don't even see the model loaded log message.

Note: I use tensorFlow 2.7.0.

vincentwinkel avatar Jan 15 '21 12:01 vincentwinkel

Any update ?

vincentwinkel avatar Feb 01 '21 19:02 vincentwinkel