question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: looks like module.exports is undefined

See original GitHub issue

Is this a BUG or a FEATURE REQUEST?: BUG

What happened: I built my (working) Node app with

nexe source/index.js --build

And got this when executing the binary:

  module.exports.createProxy = function createProxyServer(options) {
                             ^

TypeError: Cannot set property 'createProxy' of undefined
    at Object.<anonymous> (/opt/watcher/nexe_1536929910420:105654:30)
    at c (/opt/watcher/nexe_1536929910420:116845:3584)
    at b.require (/opt/watcher/nexe_1536929910420:116845:3346)
    at Object.<anonymous> (/opt/watcher/nexe_1536929910420:105623:18)
    at c (/opt/watcher/nexe_1536929910420:116845:3584)
    at b.require (/opt/watcher/nexe_1536929910420:116845:3346)
    at Object.<anonymous> (/opt/watcher/nexe_1536929910420:246:19)
    at c (/opt/watcher/nexe_1536929910420:116845:3584)
    at Function.r.import (/opt/watcher/nexe_1536929910420:116845:4190)
    at p (/opt/watcher/nexe_1536929910420:116842:15)

What you expected to happen: the app to run

How to reproduce it (as minimally and precisely as possible): I’ll try to create a reproduction if needed

Environment

  • Platform(OS/Version): Ubuntu 16.04
  • Host Node Version: 8.12.0
  • Target Node Version: 8.12.0
  • Nexe version: 2.0.0-rc.34
  • Python Version: 2.7.12

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
calebboydcommented, Sep 24, 2018

yep, the latest version should fix that.

Again, you’ll have to start with --clean --build first

0reactions
etamponicommented, Sep 24, 2018

Fixed! Thank you 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

module.exports gets undefined while importing on another file
exports assignment Server is running on port 9000. As you can see, user.js gets called before we export modules. Checking the imported object....
Read more >
TypeError: Cannot read property 'exports' of undefined ...
I found that a variable 'module' has been defined in my project. Just change it to something else. I don't know if this...
Read more >
Module.exports undefined - Get Help - Vue Forum
I create a new vue project with the Vue CLI v3.4.0. I do so with following options: · I create an import statement...
Read more >
Module Methods - webpack
Dynamically load modules. Calls to import() are treated as split points, meaning the requested module and its children are split out into a...
Read more >
WebAssembly.Module.exports() - MDN Web Docs
The WebAssembly.Module.exports() function returns an array containing descriptions of all the declared exports of the given Module.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found