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

Error when using --watch flag as documented #298

Open
leegee opened this issue Dec 19, 2018 · 1 comment
Open

Error when using --watch flag as documented #298

leegee opened this issue Dec 19, 2018 · 1 comment

Comments

@leegee
Copy link

leegee commented Dec 19, 2018

[pwa-shell 11:47:12] node -v
v8.14.0
[pwa-shell 11:47:14] mocha-webpack --watch ../ice-webelements/redux/bright-portal-actions/user-management.spec.js
------------ BUILDING ENV  development
------------ BUILDING: bright-portal ------------
Reading  ./env/development.env
  Added env var BRIGHT_PORTAL_URI_USERS_RETRIEVE = "http://localhost:3001/api/users/list"
  Added env var BRIGHT_PORTAL_URI_USER_CREATE = "http://localhost:3001/api/users/create"
  Added env var BRIGHT_PORTAL_URI_USER_UPDATE = "http://localhost:3001/api/users/update"
  Added env var BRIGHT_PORTAL_URI_SCOPES = "=http://localhost:3001/api/scopes"
  Added env var BRIGHT_PORTAL_URI_USER_AAA = "http://localhost:3001/api/users/roles"
------------ SHELL VERSION: 0.9.0 ------------
------------ APP VERSION: 1.0.8 ------------
TypeError: compiler.constructor.Watching is not a constructor
    at createWatcher (/Users/lee.goddard/src/pwa-shell/node_modules/mocha-webpack/lib/webpack/compiler/createWatchCompiler.js:26:12)
    at Object.watch (/Users/lee.goddard/src/pwa-shell/node_modules/mocha-webpack/lib/webpack/compiler/createWatchCompiler.js:33:25)
    at TestRunner.<anonymous> (/Users/lee.goddard/src/pwa-shell/node_modules/mocha-webpack/lib/runner/TestRunner.js:308:25)
    at eval (eval at processIncludes (/Users/lee.goddard/src/pwa-shell/node_modules/nodent-runtime/runtime.js:36:12), <anonymous>:3:4727)
    at <anonymous>
[pwa-shell 11:47:18]
@leegee
Copy link
Author

leegee commented Jan 7, 2019

Fixes it in an ugly way - I'm working with an older webpac if that's relevant:

  const path = require('path');
  const Watching = require(path.resolve(__dirname, '../../../../webpack/lib/Watching'));
  let createWatcher = function createWatcher() {
    return new Watching(compiler, watchOptions, noop);
  };

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

1 participant