Coder Social home page Coder Social logo

Comments (7)

jhnns avatar jhnns commented on May 21, 2024

Could you find out what traceur is trying to do?

Especially this line:

    at Function.defineProperty (/mnt/sdb1/code/dev/sane/node_modules/traceur/bin/traceur.js:257:7)

Currently I can't see that rewire has something to do with it.

from rewire.

IanVS avatar IanVS commented on May 21, 2024

All it is doing is checking for a shim and then calling the object's normal defineProperty function.

253  function defineProperty(object, name, descriptor) {
254        if (isShimSymbol(name)) {
255          name = name[symbolInternalProperty];
256        }
257        $defineProperty(object, name, descriptor);
258        return object;
259      }

I'm not sure why this would be a problem in Treaeur, because everything works fine as long as I don't use rewire. Is there anything else I can do to try to help troubleshoot?

from rewire.

jhnns avatar jhnns commented on May 21, 2024

You could create a minimal test-case that produces the error. And you could also check what value targetModule.id is here.

from rewire.

IanVS avatar IanVS commented on May 21, 2024

Alright, I'll try to put something together in the next few days.

from rewire.

IanVS avatar IanVS commented on May 21, 2024

OK, it seems that this occurs if the module being rewired exports a string or a variable with a string value. Is that not a supported use of rewire?

from rewire.

jhnns avatar jhnns commented on May 21, 2024

@IanVS are you using mocha as test runner?

from rewire.

jhnns avatar jhnns commented on May 21, 2024

OK, it seems that this occurs if the module being rewired exports a string or a variable with a string value. Is that not a supported use of rewire?

Sorry, I've over-read this.

Unfortunately yes, rewiring modules that export a primitive value is not possible, because the current API needs to attach methods like __set__ and __get__ to the export. I need to clarify that in my readme.

from rewire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.