To build app for Windows on Linux CentOS 7 by using electronuserland/builder:wine image.
The packaged exe file can be installed successfully, but the application startup reports an error and the error description:
A JavaScript error occurred in the main process
Uncaught Exception:Error:? C:\Users ...\AppData Loc... 26f0978b-dd24-4534-a6e6-7135af017806.tmp.node is not a valid Win32 application.? C: Users...\AppData Loc... 26f0978b-dd24-4534-ae6-7135af017806.tmp.nodeat process.func (as dlopen] (electron/is2c/asar bundle.js:5:1846)at Object.Module. extensions..node (internal/modules/cis/loader.js:1138:18)at Object.func [as .node] (electron/js2c/asar bundlejs:5:2073)at Module.load (internal/modules/cjs/loaderjs:935:32)at Module. load (internal/modules/cis/loader.js:776:14)at Function.f. load (electron/is2c/asar bundlejs:5:12913)at Module.require (internal/modules/cjs/loaderjs:959:19at require (internal/modules/cis/helpers.is:88:18)at load (C:\Program Files(App\resources app.asar node modules node-gyp-build index,js:22...
at Object.canonymous>(C: Program Files\App\resources app.asar\node modules ffi-napi lib bindings.js:8:43)
Start electron app successfully
Related
Using Openshift 4.6.
I'm trying to build an image with a buildConfig, a docker strategy from a binary source (local directory). The buildConfig is generated with the command:
oc new-build . name=build-name --strategy=docker --to=registry-url/image-name:tag --push-secret=secret-name --to-docker.
The build is started with the command:
oc start-build build-name --from-dir=. --wait --follow
The base image is pulled properly and the local Dockerfile starts executing. The dockerfile involves usage of meteor command, and it's okay as the base image contains meteor in /root directory and I'm running everything with --allow-superuser.
When running any meteor command (even --version), the build fails with:
## There is an issue with `node-fibers` ##
`/root/.meteor/packages/meteor-tool/.2.2.0.1jauib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/bin/linux-x64-57-glibc/fibers.node` is missing.
Try running this to fix the issue: /root/.meteor/packages/meteor-tool/.2.2.0.1jauib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /root/.meteor/packages/meteor-tool/.2.2.0.1jauib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/build
SyntaxError: Invalid regular expression
Error: Missing binary. See message above.
at Object.<anonymous> (/root/.meteor/packages/meteor-tool/.2.2.0.1jauib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/fibers.js:20:8)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/meteor/dist/bundle/programs/server/boot.js:1:75)
at Module._compile (module.js:635:30)
The file fibers.node definitely exists, as when I run in the Dockerfile echo $(ls -la ) it prints fibers.node.
To complicate things more, this problem only occurs when building in a specific project (namespace). When running the same buildConfig, with same secrets, in different projects it works well. Unfortunately, I need this project.
What can be the cause of faulty build in a specific namespace? Otherwise, there are no problen with it and it has more than sufficient resources and limits
I just installed WSL2 and Ubuntu as one of my terminal options in Windows Terminal, as I want to now do my JavaScript development in Windows instead of Mac (our clients are all Windows users).
When I try to build my Node package with "npm run build", which is just a script of "babel lib -d dist", I receive the following error, which suggests to me either Windows, the WSL2, or something in my environment variables is pushing a "C:" in front of "\mnt\c", generating the following error:
internal/modules/cjs/loader.js:883
throw err;
^
**Error: Cannot find module 'C:\mnt\c\Program Files\nodejs\node_modules\npm\bin\npm-cli.js'**
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
And here is my PATH with 'printenv' in Ubuntu:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files/VanDyke Software/Clients/:/mnt/c/Program Files (x86)/Razer Chroma SDK/bin:/mnt/c/Program Files/Razer Chroma SDK/bin:/mnt/c/Program Files (x86)/Razer/ChromaBroadcast/bin:/mnt/c/Program Files/Razer/ChromaBroadcast/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Windows/system32/config/systemprofile/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/csomm/AppData/Roaming/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Git/mingw64/bin:/mnt/c/Program Files/Git/usr/bin:/mnt/c/Program Files (x86)/QuickTime/QTSystem/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/csomm/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/csomm/AppData/Local/atom/bin:/mnt/c/Users/csomm/AppData/Roaming/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Program Files/JetBrains/WebStorm 2021.3.1/bin:/mnt/c/Users/csomm/AppData/Local/Programs/Hyper/resources/bin:/snap/bin
Any thoughts/ideas?
This has been resolved. The problem was that I had installed NVM/NPM first in Command Prompt, and owing to Windows WSL2 cross-utilizing Linux and Windows applications, NVM that was installed in Windows would run in my Ubuntu just fine, but the NPM would fail owing to relative path issue.
Solution was to "re-install" NPM natively within Ubuntu. Now it works perfectly.
I'm installing laravel elixir on my latest homestead machine , working on laravel 5.3, i followed the exact documentation to install laravel elixir, but it didn't worked , it's throwing error regarding sass file. here is snapshot
How do i solve this issue.
test version is ->
```
[19:33:15] Using gulpfile ~/sites/dev.friendsforever/server/gulpfile.js
[19:33:15] Starting 'all'...
[19:33:15] Starting 'sass'...
[19:33:16] 'sass' errored after 169 ms
[19:33:16] Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at Object.getInstalledBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/extensions.js:119:13)
at foundBinariesList (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:45:5)
at Object.<anonymous> (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/index.js:15:28)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
[19:33:16] 'all' errored after 179 ms
[19:33:16] Error in plugin 'run-sequence(sass)'
Message:
ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
Details:
errno: -2
code: ENOENT
syscall: scandir
path: /home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor
Stack:
Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at Object.getInstalledBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/extensions.js:119:13)
at foundBinariesList (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:45:5)
at Object.<anonymous> (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/index.js:15:28)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
```
image version is ->
the problem is the incompatibility between OS and node js, so the solution is just run the command npm rebuild node-sass.
Just run npm rebuild node-sass from within your Host computer. If you have node installed on your computer, it will rebuild node-sass, detect whatever environment your Host computer is, and do something specific to that node-sass build.
Then run gulp command, hope it will work.
If you haven't figured it out by now, you can run
npm install node-sass --no-bin-links
from within the virtual machine and then gulp should work.
If you are getting "Error: ENOENT: no such file or directory..." error run this command. It worked for me.
npm rebuild node-sass
Reference: https://laracasts.com/discuss/channels/elixir/laravel-53-gulp-error-cannot-find-module-laravel-elixir-vue-2
First of all, I created a tag and build my app with electron-packager:
node_modules/.bin/electron-packager . MyApp --platform=win32 --arch=x64 --icon='/home/user/Desktop/logo.ico' --asar=true --prune --overwrite
It worked fine! The problem is that now, for this release, I create a new tag, but I try to build my app with electron builder instead. I get the following error:
A JavaScript error occurred in the main process Uncaught Exception:
Error: Unable to find a valid app at Object.<anonymous> (E:\Project\dist\win-unpacke
d\resources\electron.asar\browser\init.js:128:9) at Module._compile (module.js:541:3
2) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458
:32) at tryModuleLoad(module.js:417:12) at Function.Module._load (module.js:409:3) a
t Function.Module.runMain (module.js:575:10) at run (bootstrap_node.js:360:7) at sta
rtup (bootstrap_node.js:152:9) at bootstrap_node.js:497:3
Furthermore, I try to build my app again with electron packager, but it didn't work now! I get the same problem.
I checkout my app to the previoulsy working tag, and it neither work.
Unfortunately, the code can not be distributed
Thanks!
The problem was in my package.json.
I miss to add "package.json" file to my files field
I've just installed OSX agent (to remotely build, run, and debug iOS apps created using Visual Studio Tools for Apache Cordova)
in iOS. When I want to open it (vs-mda-remote), it gives me an error:
vs-mda-remote
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
0.2.7
/usr/local/lib/node_modules/vs-mda-remote/lib/cli.js:46
'lang': process.env.LANG.replace(/_.*/,""), // Convert "en_US.UTF8" to
^
TypeError: Cannot read property 'replace' of undefined
at module.exports (/usr/local/lib/node_modules/vs-mda-remote/lib/cli.js:46:33)
at Object.<anonymous> (/usr/local/lib/node_modules/vs-mda-remote/bin/vs-mda-remote:10:5)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
Can anyone help me with this? Thank you very much.
After a while I found a solution.
The problem was in the node, cordova and remote agent version.
First of all I have OS X Yosemite and not Mavericks but still it works.
Don't download the newest version of the Node from nodejs.org, look for the other releases folder on the website.
1) Install node version 0.10.35;
2) cordova 4.0.0;
3) remote agent 0.2.6.
And everything should work perfectly.