cannot read property 'has' of null
I'm submitting a ... (check one with "x")
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report <!-- Please check the repository for a similar issue or PR before submitting -->
[x] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
Current behavior
git pull repo
npm install
npm run build:spa-dev; npm run serve:spa-hmr
wait to build it and exit
run it again
Hit an error
> @ng-seed/[email protected] serve:spa-hmr /Users/personal/code/udoma/universal-source
> node ./.server/spa-server.hmr.js
Express server listening on http://localhost:1337
DLL: Checking if DLLs are valid.
DLL: All DLLs are valid.
webpack building...
[hard-source:util] A child compiler (html-webpack-plugin for "index.html") has a
memory cache but its cache name is unknown.
HardSourceWebpackPlugin will be disabled for this child
compiler.
/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency.js:60
if(this.activeExports.has(id)) return false;
^
TypeError: Cannot read property 'has' of null
at importedNames.originModule.usedExports.filter.id (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency.js:60:26)
at Array.filter (<anonymous>)
at HardHarmonyExportImportedSpecifierDependency.getReference (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency.js:58:56)
at processDependency (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:52:48)
at depBlock.dependencies.forEach.dep (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:46:43)
at Array.forEach (<anonymous>)
at processDependenciesBlock (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:46:28)
at Compilation.compilation.plugin.modules (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:23:6)
at Compilation.applyPluginsBailResult1 (/Users/personal/code/udoma/universal-source/node_modules/tapable/lib/Tapable.js:140:27)
at Compilation.seal (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/Compilation.js:595:9)
at applyPluginsParallel.err (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/Compiler.js:508:17)
at /Users/personal/code/udoma/universal-source/node_modules/tapable/lib/Tapable.js:289:11
at _addModuleChain (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/Compilation.js:505:11)
at processModuleDependencies.err (/Users/personal/code/udoma/universal-source/node_modules/webpack/lib/Compilation.js:475:14)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
Expected/desired behavior Run smoothly
Hackfix
rm -rf node_modules/.cache
Environment
- For Tooling issues:
- Node version: v8.4.0
- Platform: Mac
- Webpack: 3.7.1
- Typescript: 2.0.0
- Others:
Having the same issue on
- Platform: Windows 7 64 bit
- Webpack: 3.8.1
- Typescript: 2.5.3
- Node: v6.11.2
- NPM: 3.10.10
@fulls1z3 can you please take a look at it ?
I'm having the same issue, but when I run the clean command. The command never exits and returns the command line. I kill the command and I'm able to build the project.
- Platform: Mac 10.13.1 (High Sierra)
- Node: 8.5.0
- Webpack: 3.8.1
- Typescript: 2.5.3
Fix for now: add this to scripts
"clean:node-cache": "rm -rf node_modules/.cache/",
and add npm run clean:node-cache to the clean command
@vlados, @dhyey35, @Saint48198 i think this shouldn't happen anymore as of the breaking changes with webpack v4.