Compilation: TypeError: Property description must be an object: undefined

Abierto
#753 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
javascript, python

Línea de trabajo

Start by reproducing the Vue project with the provided HW.py, then inspect target_es5/org.transcrypt.runtime.js and the core class-inheritance path around the reported Object.defineProperty call. Done means the project compiles without the TypeError when copying inherited attributes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

STATE: under consideration

When I use the latest newest transcrypt in a web project with Vue I very often run into the following problem:

Module build failed (from ../Transcrypt/transcrypt/bundlers/webpack/__target_es5__/index.js):                                                                                      friendly-errors 16:00:14
TypeError: Property description must be an object: undefined
    at Function.defineProperty (<anonymous>)
    at Object.__new__ (/mnt/c/Users/sefir/OneDrive/VisualStudio/projects/Transcrypt/transcrypt/bundlers/webpack/__target_es5__/org.transcrypt.__runtime__.js:263:16)
    at __class__ (/mnt/c/Users/sefir/OneDrive/VisualStudio/projects/Transcrypt/transcrypt/bundlers/webpack/__target_es5__/org.transcrypt.__runtime__.js:383:15)
    at Object.<anonymous> (/mnt/c/Users/sefir/OneDrive/VisualStudio/projects/Transcrypt/transcrypt/bundlers/webpack/__target_es5__/org.transcrypt.__runtime__.js:2514:17)
    at Module._compile (internal/modules/cjs/loader.js:778:30)

Which is caused by the following javascript (see generated code at __target_es5__/org.transcrypt.__runtime__.js):

      for (var attrib in base) {
        var descrip = Object.getOwnPropertyDescriptor(base, attrib);
        Object.defineProperty(cls, attrib, descrip);
      }

If I am not wrong that belongs to the __core__ and it is the class inheritance/copy of atributes from parent to child.

Just for the record that was a vue js new project and HW.py just contains:

class HelloWorld(object):
    name = 'HelloWorld'
    def data(self):
        return {'msg': 'Hello from Python!'}
print("Loaded python module")
#module.exports = HelloWorld
Lenguaje dominante
Python
Estrellas
2.9k
Forks
218
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TranscryptOrg/Transcrypt

Todos los issues de TranscryptOrg/Transcrypt

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.