Skip to content
This repository has been archived by the owner on Jun 5, 2021. It is now read-only.

webpack-dev-server not working #37

Closed
borgstrom opened this issue Jan 8, 2019 · 4 comments
Closed

webpack-dev-server not working #37

borgstrom opened this issue Jan 8, 2019 · 4 comments

Comments

@borgstrom
Copy link
Contributor

borgstrom commented Jan 8, 2019

Hi @dan-compton & @fwouts,

I am testing out this module and can't get the dev server to work with the version in master. I am running into this error:

Target //web/apps/admin:dev_server up-to-date:
  bazel-bin/web/apps/admin/dev_server_devserver
INFO: Elapsed time: 50.777s, Critical Path: 49.38s
INFO: 4 processes: 4 darwin-sandbox.
INFO: Build completed successfully, 6 total actions
INFO: Build completed successfully, 6 total actions
Source directory updated successfully.
internal/modules/cjs/loader.js:582
    throw err;
    ^

Error: Cannot find module '/private/var/tmp/_bazel_eborgstrom/9c6ee92ddb4001b063e79927e59e2444/execroot/cannaops/bazel-out/darwin-fastbuild/bin/web/apps/admin/dev_server_devserver.runfiles/cannaops/web/apps/admin/bazel_javascript/internal/web_bundle/dev_server_options.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/private/var/tmp/_bazel_eborgstrom/9c6ee92ddb4001b063e79927e59e2444/execroot/cannaops/bazel-out/darwin-fastbuild/bin/web/apps/admin/dev_server.serve.js:71:15)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
@fwouts
Copy link
Owner

fwouts commented Jan 8, 2019

Hi @borgstrom. You're absolutely right, this is broken. I'm on it.

fwouts added a commit that referenced this issue Jan 8, 2019
This should fix #37.

There seems to be an issue remaining where, if node_modules is present locally (because user ran `yarn install` for example), the wrong version of webpack-dev-server is used.
@fwouts fwouts closed this as completed in 1c8b9ca Jan 8, 2019
@fwouts
Copy link
Owner

fwouts commented Jan 8, 2019

Would you mind trying this again to confirm the fix worked as expected?

@borgstrom
Copy link
Contributor Author

Works great! Thanks for the quick turn around. I'm super appreciative of these rules!

@fwouts
Copy link
Owner

fwouts commented Jan 9, 2019

Great to hear. I've just released 0.0.26 with the latest changes (including latest rules_nodejs).

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

No branches or pull requests

2 participants