Closed webpack-bot closed 1 month ago
@leobezr Can you provide steps to reproduce?
@leobezr Can you provide steps to reproduce?
Repository
Link to repository
Generate a Vue project with Vue CLI
$ vue create project-name
Add electron to project
$ vue add electron-builder
Add robotjs
to project
$ yarn add robotjs
Import robotjs inside Vue component.
import robot from "robotjs";
That should break the compiler when serving the project.
Sorry, can't run reproducible repo:
make: Entering directory '/home/evilebottnawi/IdeaProjects/bezrbot/node_modules/robotjs/build'
CXX(target) Release/obj.target/robotjs/src/robotjs.o
cc1plus: warning: command line option ‘-Wbad-function-cast’ is valid for C/ObjC but not for C++
In file included from ../src/keypress.h:6,
from ../src/robotjs.cc:7:
../src/keycode.h:112:10: fatal error: X11/Xutil.h: No such file or directory
112 | #include <X11/Xutil.h>
| ^~~~~~~~~~~~~
compilation terminated.
Well thats weird, did you try creating a new repo?
Same problem due robotjs
, What is your os
and version?
Windows 10 @vue/cli 4.5.11 node v14.16.0
h, weirds, should be compiled... maybe vue-cli already handle node
extension, can you check it? just remove loader
h, weirds, should be compiled... maybe vue-cli already handle
node
extension, can you check it? just remove loader
Can't you just make the changes to try and run it ? I'm not sure what loader you're referring to, is it node-loader
?
Also, are you running e:dev
for electron build?
I can't run due impossible to install, maybe you can try to reproduce it without vue-cli?
Just wanted to pop in here to share that I'm encountering this same issue. I'm on Windows 11.
@leobezr Is it resolved please? I also have the same problem.
@leobezr Is it resolved please? I also have the same problem.
Not at the time, I just gave up on this project, my suggestion is, if your using robotjs, just use Python instead.
@leobezr All right, thank you.
Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!
Im trying to load
robotjs
withelectron
but I keep getting an annoyingFailed to compile
error.I'm using
Vue.js
for the interface, if that matters.The error
I tried adding a new rule using
node-loader
towebpack
but that didn't work.This issue was moved from webpack/webpack#14012 by @alexander-akait. Original issue was by @leobezr.