type error happened when require
touchsky2018 opened this issue · 2 comments
electron 15
angular 12
typescript 4
type error happened when require
can give some hint?
-----source in render process------------
const remote = require('@electron/remote');
const win = remote.getCurrentWindow();
win.close();
-----console error in dev tool------------
ERROR TypeError: ve.join is not a function
at Object.897 (main.9b0169c1be4a3fff9377.js:1)
at n (runtime.ca27991353073d8e1fb4.js:1)
at Object.263 (main.9b0169c1be4a3fff9377.js:1)
at n (runtime.ca27991353073d8e1fb4.js:1)
at Object.574 (main.9b0169c1be4a3fff9377.js:1)
at n (runtime.ca27991353073d8e1fb4.js:1)
at Object.335 (main.9b0169c1be4a3fff9377.js:1)
at n (runtime.ca27991353073d8e1fb4.js:1)
at Object.77 (main.9b0169c1be4a3fff9377.js:1)
at n (runtime.ca27991353073d8e1fb4.js:1)
ax @ main.9b0169c1be4a3fff9377.js:1
handleError @ main.9b0169c1be4a3fff9377.js:1
uv @ main.9b0169c1be4a3fff9377.js:1
iC @ main.9b0169c1be4a3fff9377.js:1
s @ main.9b0169c1be4a3fff9377.js:1
(anonymous) @ main.9b0169c1be4a3fff9377.js:1
invokeTask @ polyfills.4a3dac0f10d3050b7dee.js:1
onInvokeTask @ main.9b0169c1be4a3fff9377.js:1
invokeTask @ polyfills.4a3dac0f10d3050b7dee.js:1
runTask @ polyfills.4a3dac0f10d3050b7dee.js:1
invokeTask @ polyfills.4a3dac0f10d3050b7dee.js:1
S @ polyfills.4a3dac0f10d3050b7dee.js:1
D @ polyfills.4a3dac0f10d3050b7dee.js:1
Hey @touchsky2018 thanks for filing this issue.
There's not much to go on in this bug report. If you think this is an electron/remote
bug, would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue -- e.g. no angular or typescript -- and upload it as a gist that you could link here?
Alternately, if you think it's an issue with how the tools are being used together, you will probably have better luck with this question at one of the links at the project's Community page -- in particular, be sure to give the Electron Discord server a try.
Marking as 'question' because more info is needed before this ticket can be triaged further.
No activity for a long time. Closing.