Electron run on Nodejs. A JavaScript error occurred in the main process. Error spawn {path} Enoent - r

I've made a Shinyapp, and try to turn it into a standalone application through Nodejs and Electron.
I've sucessfully made it on Windows. However, when I work on macOS, I encounter this error:
A JavaScript error occurred in the main process
Uncaught Exception: Error: spawn {path of electron file} Enoent at ...the error displayed
Guess there's something wrong in Nodejs, but I'm a total newbie to nodejs. Have tried to add the file path into PATH environment variable, but it did not wrok. The same error appears.
Looking for someone who can help me sort it out.
I appreciate any help from you!!

Related

Error in ng serve command. ./ node module/#angular-devkit/build

node version 14.15.0 and angular version 12.0.5;
earlier it worked fine but after reinstallation of angular and nodejs it shows this error on ng serve command.
ERROR in ./src/assets/styles/style.scss (./node_modules/#angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/dist/cjs.js??ref--15-3!./src/assets/styles/style.scss)
Module Error (from ./node_modules/postcss-loader/src/index.js):
(Emitted value instead of an instance of Error) CssSyntaxError: D:\node-v15.11.0-win-x64\ssc1\src\assets\styles\icons\material-design-iconic-font\css\materialdesignicons.min.css:1:86: Can't resolve '..//fonts/materialdesignicons-webfont.eot' in 'D:\node-v15.11.0-win-x64\ssc1\src\assets\styles\icons\material-design-iconic-font\css'
If anybody know the solution please tell me how to solve this issue
image of error here

Android Studio 4 Build ERROR : Execution failed for task ':app:mergeDebugResources'

Hello this is my first time make android program and found this error but the code not have an error point. the error message is below :
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
Failed to transform aapt2-4.1.1-6503028-windows.jar (com.android.tools.build:aapt2:4.1.1-6503028) to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for Aapt2Extractor: C:\Users\lenovo.gradle\caches\modules-2\files-2.1\com.android.tools.build\aapt2\4.1.1-6503028\cc838ebadee3649d47e07d029371bc1054e2200d\aapt2-4.1.1-6503028-windows.jar.
> java.io.IOException: Unable to delete directory 'C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc'
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc\aapt2-4.1.1-6503028-windows
can someone tell me how to fix it ?
i had same problem in linux
tried many ways and asked some question.
finally found out there is file missing named aap2 in build-tools
i couldn't find that file to place it in destination so i deleted whole file and re Download it with sdk manager and if it doesn't work too i guess u should try reinstall android studio
yes its not a good answer but it was all experience i had with this error.

How to fix "vagrant up" errors when trying to set up Trellis?

I've been trying to set up a Trellis local WordPress dev environment from the Roots stack. I did all the steps from the docs, have the recommended folder structure, downloaded all the dependencies, but I still get a few errors.
First I get some errors and warnings when I use "yarn" in my theme folder, as suggested here. They say to use the CLI from my host instead of Vagrant box, that's just the MacBook's terminal right? Or do I need a CLI from VirtualBox?
The second error happens when trying to call "vagrant up", and this is one that I can paste here as it's a bit more concise.
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
After Googling this I got a lot of outdated suggestions to check my PATH and restart the VirtualBox, but these I tried and didn't help. I hope someone can help me set this up, thanks. :)

Grunt error SailsJS when lifting with --no-frontend

I have a Sails Api which the first time boots like a charm.
Press CTRL + C to stop it and then try to start it again. It works, BUT,
error: ** Grunt :: An error occurred. **
error:
------------------------------------------------------------------------
Aborted due to warnings.
Running "clean:dev" (clean) task
Warning: Cannot delete files outside the current working directory.
------------------------------------------------------------------------
error: Looks like a Grunt error occurred--
error: Please fix it, then **restart Sails** to continue running tasks (e.g. watching for changes in assets)
error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run `npm install` if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the `.tmp` directory?
error: e.g., `folderthingy` ?
error:
error: If you think this might be the case, try running:
error: sudo chown -R 501 folderthingy
Well, I check it all, and the folder just is my own and has enough rights. I also put up a 777 for testing purposes but this didn't change a thing.
Then, I decided to clear out all the contents of the .tmp folder and try to boot again. This worked like a charm, .tmp got filled again, and when I stopped the server, tried to reboot it, I got the exact same error message again!
I'm booting with the --no-frontend option, so in fact I don't understand why it even wants to load grunt.
Why is this happening? What's going wrong here?
Why it happens is still not known to mankind, but I fixed it with removing the Gruntfile.
Fixed this by following below steps :
File path in your sails app -> tasks/config/sync.js
// 1. Install it as a local dependency of your Sails app:
// ```
// $ npm install grunt-sync --save-dev --save-exact
// ```
//
//
// 2. Then uncomment the following code:
//
// ```
// // Load Grunt plugin from the node_modules/ folder.
// grunt.loadNpmTasks('grunt-sync');
// ```
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Note: Work for Warning "sync:dev" not found
If you are using Linux, try doing sudo sails lift, you can have problems with permissions (happened to me). If Windows - check that no file manager or some other program is blocking the .tmp folder (also happened to me when I opened the folder in Total Commander).
In any case, since you don't use frontend, you can simply remove some of the grunt tasks (in the folder tasks/ you have README.md which explains which tasks are run in which case) or all of them (see documentation) and you won't have the problem.
i also got this error-
error: ** Grunt :: An error occurred. **
error:
------------------------------------------------------------------------
Aborted due to warnings.
Running "sass:dev" (sass) task
> error: Looks like a Grunt error occurred--
>
> error: Please fix it, then **restart Sails** to continue running tasks
> (e.g. watching for changes in assets)
>
> error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run `npm install` if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the `.tmp` directory?
error: e.g., `/Users/siyaram.malav/Desktop/repo/project1/.tmp` ?
this error came because it could not find the sass module.And ran following command
sudo gem install sass
it worked for me.
In your case, try running sudo gem install clean command.
it should work.
thanks.
I had the same problem while following this tutorial:
https://www.youtube.com/watch?v=ZE7ye2G_H9Q&index=4&list=PLf8i4fc0zJBzLhOe6FwHpGhBDgqwInJWZ
I created a "linker" folder since that's what the guy did, which then prompted me with the error. It looks like he's using an older version of SailsJS since he runs into no errors.
Did you by any chance create a new folder in the assets folder? If you did, the problem is that grunt isn't able to run tasks on the specific folder since it's not linked with the rest of the assets folders and files. Try placing all newly created files within already existing folders and trying again. This worked for me.

Error: Unhandled Exception: 'NoneType' object has no attribute '__getitem__'

I am loading one of the example apps from Shiny R into ShiniApps.io`
library(shinyapps)
shinyapps::setAccountInfo(name='xxx', token='xxx', secret='xxx')
deployApp("01_hello")
and then I get this error:
Error: Unhandled Exception: 'NoneType' object has no attribute 'getitem'
The app appeared in the web-page of Shinyapps.io as "undeployed".
Any clue what may be causing this error? the error is the same whether I run R 64 or 32 bit.
I had the same problem today. I wasn't able to successfully deploy a new app (getting the same error), but I was able to redeploy a previous app.
I have tried removing all packages and code from my new app (left only empty shinyServer and shinyUI functions uncommented) and still couldn't deploy.
Restarted R several times. Updated all packages. Nothing helped.
A few hours later I tried to deploy again and it passed without errors.
I know this is not exactly an answer but I suspect it was a server-side error because it failed during the "Starting instances" step of deployment.
So try to deploy it again, hope it works this time.

Resources