electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 99 forks source link

Cannot read property 'length' of null #293

Open utillity opened 6 years ago

utillity commented 6 years ago

When I try to run my application, it crashes with the following error:

null code returned for "C:\...\src\main.ts".  Please raise an issue on 'electron-compile' with the contents of this file.
App threw an error during load
TypeError: Cannot read property 'length' of null
    at Object.stripShebang (internal/module.js:50:24)
    at Module._compile (module.js:528:28)
    at Object.require.extensions.(anonymous function) [as .ts] (C:\...\node_modules\electron-compile\lib\require-hook.js:77:14)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at init (C:\...\node_modules\electron-compile\lib\config-parser.js:294:16)
    at main (C:\...\node_modules\electron-prebuilt-compile\lib\es6-init.js:58:29)
    at Object.<anonymous> (C:\...\node_modules\electron-prebuilt-compile\lib\es6-init.js:61:1)

the file is very short and here are its contents:

// require('babel-register')

console.dir('hi!');
require('./workers/db');
require('./workers/hardware');
require('./workers/camera');
require('./server');

If I remove the WORKERS requires, the application runs.