“Cannot read property ‘harmonyModule’ of null” in watch mode

Happens with 2.2.0-rc.0 while running in watch mode / webpack-dev-server under unknown conditions after editing a file. After it occurs, re-editing and saving the file, or a dependency, or a parent does not help. Restarting the webpack-dev-server builds successfully.

ERROR in ./src/api/notifications/helpers.ts
Module parse failed: .../node_modules/awesome-typescript-loader/dist/entry.js?{"configFileName":".../src/tsconfig.json","useBabel":true,"sourceMap":true,"verbose":false}!.../src/api/notifications/helpers.ts Cannot read property 'harmonyModule' of null
You may need an appropriate loader to handle this file type.
TypeError: Cannot read property 'harmonyModule' of null
    at makeHarmonyModule (.../node_modules/webpack/lib/dependencies/HarmonyImportDependencyParserPlugin.js:14:17)
    at Parser.import (.../node_modules/webpack/lib/dependencies/HarmonyImportDependencyParserPlugin.js:25:3)
    at Parser.applyPluginsBailResult (.../node_modules/tapable/lib/Tapable.js:73:27)
    at Parser.walkImportDeclaration (.../node_modules/webpack/lib/Parser.js:547:7)
    at Parser.walkStatement (.../node_modules/webpack/lib/Parser.js:432:32)
    at Parser.<anonymous> (.../node_modules/webpack/lib/Parser.js:413:9)
    at Array.forEach (native)
    at Parser.walkStatements (.../node_modules/webpack/lib/Parser.js:411:13)
    at Parser.parse (.../node_modules/webpack/lib/Parser.js:1142:8)
    at .../node_modules/webpack/lib/NormalModule.js:199:17
    at .../node_modules/webpack/lib/NormalModule.js:164:10
    at .../node_modules/loader-runner/lib/LoaderRunner.js:365:3
    at iterateNormalLoaders (.../node_modules/loader-runner/lib/LoaderRunner.js:206:10)
    at iterateNormalLoaders (.../node_modules/loader-runner/lib/LoaderRunner.js:213:10)
    at .../loader-runner/lib/LoaderRunner.js:228:3
    at context.callback (.../node_modules/loader-runner/lib/LoaderRunner.js:106:13)
 @ ./src/api/notifications/index.ts 3:0-48

Author: Fantashit

5 thoughts on ““Cannot read property ‘harmonyModule’ of null” in watch mode

Comments are closed.