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

Aperta
#753 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, python
Ambito
compilers, web-dev

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Python
Stelle
2.9k
Fork
218
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TranscryptOrg/Transcrypt

Tutte le issue di TranscryptOrg/Transcrypt

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.