Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple express example is broken #60

Closed
mattmoor opened this issue Nov 28, 2017 · 2 comments
Closed

Simple express example is broken #60

mattmoor opened this issue Nov 28, 2017 · 2 comments

Comments

@mattmoor
Copy link
Contributor

See here: https://github.com/mattmoor/rules_nodejs-1/tree/express-example

The http example works:

$ bazel run :http
INFO: Analysed target //:http (0 packages loaded).
INFO: Found 1 target...
Target //:http up-to-date:
  bazel-bin/http_bin.sh
  bazel-bin/http
INFO: Elapsed time: 0.232s, Critical Path: 0.01s
INFO: Build completed successfully, 1 total action

INFO: Running command line: bazel-bin/http
Server running at http://127.0.0.1:8000/

However, the express version doesn't:

$ bazel run :express
INFO: Analysed target //:express (0 packages loaded).
INFO: Found 1 target...
Target //:express up-to-date:
  bazel-bin/express_bin.sh
  bazel-bin/express
INFO: Elapsed time: 0.240s, Critical Path: 0.01s
INFO: Build completed successfully, 1 total action

INFO: Running command line: bazel-bin/express
failed to load main  TypeError: Cannot set property 'o' of undefined
    at Object.<anonymous> (/home/mattmoor/rules_nodejs/examples/express/node_modules/debug/src/node.js:85:22)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/mattmoor/rules_nodejs/examples/express/node_modules/debug/src/index.js:9:20)
    at Module._compile (module.js:635:30)
ERROR: Non-zero return code '1' from command: Process exited with status 1

I'm assuming this simple example works (I'm not a Node.js guy), I am following this.

@alexeagle
Copy link
Collaborator

I hit the same issue - a change to the module resolution order broke the debug npm module.
Was just reverted in a015ac1

@mattmoor
Copy link
Contributor Author

Cool thanks, that works for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants