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

yargs is missing when loading the nsfw index in a bundled electron application #934

Closed
kittaakos opened this issue Dec 4, 2017 · 9 comments
Labels
electron issues related to the electron target

Comments

@kittaakos
Copy link
Contributor

Starting server worker...
Server worker has been started. [ID: 1 | PID: 7408]
Server worker is ready to accept messages. [ID: 1 | PID: 7408]
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":30,"msg":"Theia app listening on http://localhost:51659. []","time":"2017-12-04T10:54:11.637Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6604] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:14.751Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 1144] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:14.831Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6064] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:14.861Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 1112] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:15.149Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6932] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:15.180Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6884] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:15.281Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":30,"msg":"Started watching the git repository: [ 'file:///c%3A/Users/kittaakos/Desktop/tmp/theia' ]","time":"2017-12-04T10:54:15.715Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 8264] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:15.846Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 4936] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:15.903Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 7240] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:15.950Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 7416] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:16.341Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 5572] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:16.372Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 5064] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:16.403Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6432] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:16.748Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 7540] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:16.825Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6360] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:17.108Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6920] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:17.284Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"The nsfw-watcher server crashed 5 times in the last 3 minutes. The server will not be restarted. []","time":"2017-12-04T10:54:17.330Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6408] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:17.362Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"The nsfw-watcher server crashed 5 times in the last 3 minutes. The server will not be restarted. []","time":"2017-12-04T10:54:17.372Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"[nsfw-watcher: 6324] module.js:472\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'yargs'\r\n    at Function.Module._resolveFilename (module.js:470:15)\r\n    at Function.Module._load (module.js:418:25)\r\n    at Module.require (module.js:498:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:9:13)\r\n    at Object.<anonymous> (C:\\PROGRA~1\\typefox\\Yangster\\resources\\app\\node_modules\\@theia\\filesystem\\lib\\node\\nsfw-watcher\\index.js:26:3)\r\n    at Module._compile (module.js:571:32)\r\n    at Object.Module._extensions..js (module.js:580:10)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n []","time":"2017-12-04T10:54:17.477Z","v":0}
{"name":"Theia","hostname":"DESKTOP-VJRAMKC","pid":7408,"level":50,"msg":"The nsfw-watcher server crashed 5 times in the last 3 minutes. The server will not be restarted. []","time":"2017-12-04T10:54:17.477Z","v":0}

The log message is strange too: why does it tell three times that the server has crashed five times...

@kittaakos kittaakos added electron issues related to the electron target OS/Windows issues related to the Windows OS labels Dec 4, 2017
@akosyakov
Copy link
Member

in VS code for forked processes they add process.noAsar = true; at the beginning I wonder whether it could help, if yes we need to add it at the top of ipc-bootstrap.ts

The log message is strange too: why does it tell three times that the server has crashed five times...

look at PIDs, they are different watchers

@kittaakos
Copy link
Contributor Author

yargs is not among the dependencies.

@akosyakov
Copy link
Member

it is via @theia/core, is not it?

@kittaakos
Copy link
Contributor Author

Strange, it is indeed in the package.json, but not in the final application:
screen shot 2017-12-04 at 13 14 41

@kittaakos
Copy link
Contributor Author

It does not happen anymore.

@kittaakos
Copy link
Contributor Author

It still exists:

Starting server worker...
Server worker has been started. [ID: 1 | PID: 13208]
Server worker is ready to accept messages. [ID: 1 | PID: 13208]
root INFO Theia app listening on http://localhost:52678.
Received message which is neither a response nor a notification message:
"52678"
root ERROR [nsfw-watcher: 6896] module.js:487
    throw err;
    ^

Error: Cannot find module 'yargs'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Program Files\typefox\xxx\resources\app\node_mo
dules\@theia\filesystem\lib\node\nsfw-watcher\index.js:18:13)
    at Object.<anonymous> (C:\Program Files\typefox\xxx\resources\app\node_mo
dules\@theia\filesystem\lib\node\nsfw-watcher\index.js:34:3)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
root ERROR Request getApplicationInfo failed with error: ENOENT: no such file or
 directory, open 'C:\Program Files\typefox\xxx\package.json' Error: ENOENT: n
o such file or directory, open 'C:\Program Files\typefox\xxx\package.json'
    at Object.fs.openSync (fs.js:652:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:172:20
)
    at Object.fs.readFileSync (fs.js:553:33)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:508:29)
    at Object.readJsonFile (C:\Program Files\typefox\xxx\resources\app\node_m
odules\@theia\application-package\lib\json-file.js:22:26)
    at ApplicationPackage.get [as pck] (C:\Program Files\typefox\xxx\resource
s\app\node_modules\@theia\application-package\lib\application-package.js:146:44)

    at ApplicationServerImpl.getApplicationInfo (C:\Program Files\typefox\xxx
\resources\app\node_modules\@theia\core\lib\node\application-server.js:39:42)
    at JsonRpcProxyFactory.<anonymous> (C:\Program Files\typefox\xxx\resource
s\app\node_modules\@theia\core\lib\common\messaging\proxy-factory.js:216:73)
    at step (C:\Program Files\typefox\xxx\resources\app\node_modules\@theia\c
ore\lib\common\messaging\proxy-factory.js:47:23)
    at Object.next (C:\Program Files\typefox\xxx\resources\app\node_modules\@
theia\core\lib\common\messaging\proxy-factory.js:28:53)
root ERROR Request watchFileChanges failed with error: Connection is closed. Err
or: Connection is closed.
    at new ConnectionError (C:\Program Files\typefox\xxx\resources\app\node_m
odules\vscode-jsonrpc\lib\main.js:138:28)
    at throwIfClosedOrDisposed (C:\Program Files\typefox\xxx\resources\app\no
de_modules\vscode-jsonrpc\lib\main.js:613:19)
    at Object.sendRequest (C:\Program Files\typefox\xxx\resources\app\node_mo
dules\vscode-jsonrpc\lib\main.js:715:13)
    at C:\Program Files\typefox\xxx\resources\app\node_modules\@theia\core\li
b\common\messaging\proxy-factory.js:309:72
    at Promise (<anonymous>)
    at C:\Program Files\typefox\xxx\resources\app\node_modules\@theia\core\li
b\common\messaging\proxy-factory.js:302:24

@kittaakos kittaakos reopened this Sep 18, 2018
@kittaakos
Copy link
Contributor Author

It is due to a version mismatch. We have multiple versions of yargs:

yarn why yargs
yarn why v1.9.4
[1/4] 🤔  Why do we have the module "yargs"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "yargs"
info Reasons this module exists
   - "workspace-aggregator-1ab7e8df-5efb-4ce7-af44-91b4853d8cd8" depends on it
   - Hoisted from "_project_#nyc#yargs"
   - Hoisted from "_project_#@theia#application-manager#webpack-cli#yargs"
info Disk size without dependencies: "264MB"
info Disk size with unique dependencies: "592MB"
info Disk size with transitive dependencies: "1.37GB"
info Number of shared dependencies: 35
=> Found "lerna#[email protected]"
info This module exists because "_project_#lerna" depends on it.
info Disk size without dependencies: "164MB"
info Disk size with unique dependencies: "592MB"
info Disk size with transitive dependencies: "1.86GB"
info Number of shared dependencies: 48
=> Found "@theia/core#[email protected]"
info This module exists because "_project_#@theia#core" depends on it.
info Disk size without dependencies: "160MB"
info Disk size with unique dependencies: "588MB"
info Disk size with transitive dependencies: "1.86GB"
info Number of shared dependencies: 48
=> Found "showdown#[email protected]"
info This module exists because "_project_#@theia#extension-manager#showdown" depends on it.
info Disk size without dependencies: "164MB"
info Disk size with unique dependencies: "492MB"
info Disk size with transitive dependencies: "1.27GB"
info Number of shared dependencies: 35
=> Found "electron-rebuild#[email protected]"
info This module exists because "_project_#@theia#application-manager#electron-rebuild" depends on it.
info Disk size without dependencies: "164MB"
info Disk size with unique dependencies: "592MB"
info Disk size with transitive dependencies: "1.86GB"
info Number of shared dependencies: 48
=> Found "handlebars#[email protected]"
info Reasons this module exists
   - "_project_#istanbul#handlebars#uglify-js" depends on it
   - Hoisted from "_project_#istanbul#handlebars#uglify-js#yargs"
info Disk size without dependencies: "44MB"
info Disk size with unique dependencies: "156MB"
info Disk size with transitive dependencies: "324MB"
info Number of shared dependencies: 9
=> Found "glob-all#[email protected]"
info This module exists because "_project_#@theia#application-manager#webpack-cli#glob-all" depends on it.
info Disk size without dependencies: "180MB"
info Disk size with unique dependencies: "268MB"
info Disk size with transitive dependencies: "268MB"
info Number of shared dependencies: 1
✨  Done in 1.25s.

screen shot 2018-09-27 at 10 30 28

After the bundling of the electron application, yargs is available from node_modules/@theia/core/node_modules/yargs but it is not available at node_modules/yargs so it will fail at runtime.

@kittaakos
Copy link
Contributor Author

Bumping up to [email protected] (that is aligned with other yargs version) fixes the issue. I will create a PR for that.
screen shot 2018-09-27 at 15 00 37

Also, I try to align the ws versions too.

@kittaakos kittaakos changed the title [Windows] yargs is missing when loading the nsfw index in a bundled electron application yargs is missing when loading the nsfw index in a bundled electron application Sep 27, 2018
@kittaakos kittaakos removed the OS/Windows issues related to the Windows OS label Sep 27, 2018
@kittaakos
Copy link
Contributor Author

It seems we will run into this defect from time to time... :(

kittaakos pushed a commit that referenced this issue Sep 27, 2018
It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Closes: #934.
Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Oct 19, 2018
It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Added a `prepare` script to check the hoisted dependencies.

Closes: #934.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Oct 19, 2018
It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Added a `prepare` script to check the hoisted dependencies.

Closes: #934.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Oct 19, 2018
It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Added a `prepare` script to check the hoisted dependencies.

Closes: #934.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Oct 22, 2018
It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Added a `prepare` script to check the hoisted dependencies.

Closes: #934.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Oct 23, 2018
It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Added a `prepare` script to check the hoisted dependencies.

Closes: #934.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Oct 23, 2018
It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Added a `prepare` script to check the hoisted dependencies.

Closes: #934.

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Oct 23, 2018
It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Added a `prepare` script to check the hoisted dependencies.

Closes: #934.

Signed-off-by: Akos Kitta <[email protected]>
davidfestal added a commit to eclipse-che/che that referenced this issue Nov 29, 2018
bogthe pushed a commit to ARMmbed/theia that referenced this issue Jan 21, 2019
…ies.

It is a must for the bundled electron application.
Otherwise, these two dependencies won't be hoisted into
the root `node_modules` folder.
Instead, they will stay in `node_modules/@theia/core/node_modules`,
and will not make into the bundled electron application.

Added a `prepare` script to check the hoisted dependencies.

Closes: eclipse-theia#934.

Signed-off-by: Akos Kitta <[email protected]>
Signed-off-by: Bogdan Stolojan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target
Projects
None yet
Development

No branches or pull requests

2 participants