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

Unexpected identifier #2

Open
B-Interactive opened this issue Nov 8, 2018 · 2 comments
Open

Unexpected identifier #2

B-Interactive opened this issue Nov 8, 2018 · 2 comments

Comments

@B-Interactive
Copy link

Using the line of code pulled from the provided sample, it's throwing a SyntaxError, pointing to the identifier, WindowsOSK.

My index.js:
import WindowsOSK from 'electron-windows-osk';
const { app, BrowserWindow } = require('electron');

The output:

App threw an error during load

D:\Electron\project\index.js:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { import WindowsOSK from 'electron-windows-osk';

SyntaxError: Unexpected identifier
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile (internal/modules/cjs/loader.js:678:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at loadApplicationPackage (D:\Electron\project\node_modules\electron\dist\resources\default_app.asar\main.js:287:12)
at Object.

@glebmachine
Copy link

glebmachine commented Jan 29, 2019

imports not transpiled in your case, use require as well

@zainlateef
Copy link

When I use require, I get an "Invalid access to memory location" error, something having to do with addon.node. Any ideas?

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

No branches or pull requests

3 participants