Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Cannot use import statement outside a module #37

Open
Jenifer-TheCoder opened this issue Jan 22, 2021 · 1 comment
Open

Cannot use import statement outside a module #37

Jenifer-TheCoder opened this issue Jan 22, 2021 · 1 comment

Comments

@Jenifer-TheCoder
Copy link

Jenifer-TheCoder commented Jan 22, 2021

I had installed the electron-extensions package in my existing working Electron sample.

Pasted below lines into main process:
`import { ExtensibleSession } from 'electron-extensions/main';
import { app } from 'electron';

const extensions = new ExtensibleSession();

(async () => {
await app.whenReady();
extensions.loadExtension('C:/.../abcdefghijklmnoprstuwxyz'); // Path to the extension to load
})();`

I am getting the above mentioned error, I tried adding type:module to the package.json file.
Nothing helped, may be I need to play around a bit.
Any suggestions?

@rimonhanna
Copy link

same here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants