openworm / geppetto-application

Sample Geppetto application
http://geppetto.org
Other
3 stars 1 forks source link

webpack watch fails when a file is modified #24

Open rodriguez-facundo opened 5 years ago

rodriguez-facundo commented 5 years ago

Issue

Problem with awesome-typescript-loader.

Log

 if (!compiler._tsInstances) {
                   ^
TypeError: Cannot read property '_tsInstances' of undefined
    at resolveInstance (/Users/snakes/Desktop/nwb-explorer/webapp/node_modules/awesome-typescript-loader/src/instance.ts:73:20)
    at /Users/snakes/Desktop/nwb-explorer/webapp/node_modules/awesome-typescript-loader/src/instance.ts:366:26
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/snakes/Desktop/nwb-explorer/webapp/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/snakes/Desktop/nwb-explorer/webapp/node_modules/tapable/lib/Hook.js:154:20)
    at Watching._go (/Users/snakes/Desktop/nwb-explorer/webapp/node_modules/webpack/lib/Watching.js:41:32)
    at Watching._invalidate (/Users/snakes/Desktop/nwb-explorer/webapp/node_modules/webpack/lib/Watching.js:169:9)
    at watcher.compiler.watchFileSystem.watch (/Users/snakes/Desktop/nwb-explorer/webapp/node_modules/webpack/lib/Watching.js:138:11)
    at Watchpack.watcher.once (/Users/snakes/Desktop/nwb-explorer/webapp/node_modules/webpack/lib/node/NodeWatchFileSystem.js:59:4)
    at Object.onceWrapper (events.js:277:13)
    at Watchpack.emit (events.js:189:13)
    at Watchpack._onTimeout (/Users/snakes/Desktop/nwb-explorer/webapp/node_modules/webpack/node_modules/watchpack/lib/watchpack.js:144:7)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nwb-explorer@0.2.0 build-dev-noTest:watch: `webpack --devtool source-map --env.noTest=true --progress --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nwb-explorer@0.2.0 build-dev-noTest:watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/snakes/.npm/_logs/2019-09-04T16_22_05_210Z-debug.log

solution

I had to move to

// package.json
{
"devDependencies": {
  "awesome-typescript-loader": "^5.0.0-1"
  }
}

investigate

Performance is not nice with this update