Play Application Couldn't be Started - angularjs

Recently I've been assigned for a project created with AngularJs and it uses Java Play framework to run it. I use IntelliJ-Idea IDE for the development and to run this application.
Once I clicked on "Run", it gives me following errors in the console.
'force' enabled
Will run: [gulp, --gulpfile=gulpfile.js, watch, --force] in /home/supuns/Projects/bd-business-portal/ui
java.io.IOException: Cannot run program "gulp" (in directory "/home/supuns/Projects/bd-business-portal/ui"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
[trace] Stack trace suppressed: run 'last compile:run' for the full output.
[error] (compile:run) java.io.IOException: Cannot run program "gulp" (in directory "/home/supuns/Projects/bd-business-portal/ui"): error=2, No such file or directory
[error] Total time: 2 s, completed Oct 24, 2016 10:54:25 AM
Process finished with exit code 1
I can't figure out what is happening because I'm new to the environment.
UPDATE:
Sorry about the less information I have given in my question. I have globally installed gulp but still it is not working.
Here's the content of build.sbt file.
name := """bd-business-portal"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
javaJdbc,
cache,
javaWs
)

With the help of my team members I have found the reason that cause this issue is IntelliJ-Idea doesn't know the path to 'Gulp'. I'm using Ubuntu 16.04 and even though I have set the path globally it doesn't understand where to find gulp.
Therefore I have installed sbt and from the IntelliJ terminal ran the command:
sbt run
and it worked.
Update
As I had to work on multiple Play framework sbt projects, doing "sbt run" on the terminal and closing IntelliJ windows to free the port was bit hectic. Therefore I decided to find the actual path variable that created this behavior and I found the PATH variable saved in /etc/environment was "/home/supuns/.nvm/versions/node/v6.9.1/bin/gulp" and I changed it to
/home/supuns/.nvm/versions/node/v6.9.1/bin
Then the IntelliJ "Play" button worked as intended.

I also faced the same issue. I fixed it by installing gulp cli along with gulp. Below 2 commands fixed my problem:
npm install -global gulp-cli
npm install gulp --save-dev

Related

Ionic build failed without specific error

After cloning my Ionic React project to my server, I ran npm install and all dependencies were installed as expected.
But when I tried to build my app running sudo ionic build --verbose, it tooks much more time than usual and ended like this :
eslint:lint-result-cache Persisting cached results: /var/www/html/ms-users-front/node_modules/.cache/.eslintcache +0ms
eslint:cli-engine Linting complete in: 4827ms +48ms
//It stay here for at least 10min before to failed while it tooks 1min in my local machine.
The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
[ERROR] An error occurred while running subprocess react-scripts.
react-scripts build exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 1 functions +1ms
ionic:utils-process processExit: exiting (exit code: 1) +44ms
My server is an ec2 instance with httpd installed and everything was working great before I tried to build a new version yesterday.
With exactly the same process, the app is building perfectly on my local machine...
I tried npm update, delete eslint cache, and build but without success.
I tried to downgrade Typescript to 4.1 because I had a warning saying that Typescript should be >4.5 and it was 4.7. But after some tests on local, it looks like this has no incidence on the build process.
I'm totally stuck and I absolutly don't know what to try.

React Native: XCode: Build failed with error "EMFILE: too many open files, watch"

– MackBook Air M1
– macOS 11.3
– XCode 12.5
– react native 0.64.1
– node 16.0.0
– npm 7.15.1
– watchman 2021.05.31.00
When I try to archive a project or build one for a device, Xcode stops building with an error:
/Users/aptyp/Projects/Proffmylife/Client/node_modules/metro-hermes-compiler/src/emhermesc.js:81
throw ex;
^
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:204:21)
Emitted 'error' event on NodeWatcher instance at:
at NodeWatcher.checkedEmitError (/Users/aptyp/Projects/Proffmylife/Client/node_modules/sane/src/node_watcher.js:143:12)
at FSWatcher.emit (node:events:365:28)
at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:210:12) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
filename: null
}
Command PhaseScriptExecution failed with a nonzero exit code
But for the simulator, the build works fine.
I have tried to reinstall node_modules, Pods, watchman with brew. Also I've created files limit.maxfiles.plist, limit.maxproc.plist into dir /Library/LaunchDaemons/ and now ulimit -a shows processes 2000 and file descriptors 524288. Restarting computer and unlock Keychain.
On my PC with Hackintosh I don't have this problem.
This error is because of a bug in module fsevents for mac m1 silicon. See the thread: https://github.com/facebook/metro/issues/668
It got fixed with new version of watchman. Upgrade your watchman through brew. Delete your project and download from git and rebuild everything along with pod install and then it should archive no problem.
Facebook guy admitting to the bug and fixing it
I created a new project with the same name, installed all the latest packages and copied the code. Only after that the project was built success.

Cannot deploy to with gh-pages with specific project due to error: cannot spawn sh: No such file or directory

Keep getting the error:
error: cannot spawn sh: No such file or directory
fatal: unable to fork
The project builds correctly but when trying to deploy my website it fails.
Website was created with "create-react-app" on my windows 8 pc with the command "gh-pages -d build"
This issue only occurs in this specific project on my pc as when I create a new project with "create-react-app" on my pc it'll deploy fine. This specific project can also be deployed fine with "gh-pages -d build" on my mac but not my pc.
Error of failing to deploy on console
Error log console references
Repository
Somewhere along the line I must've messed up something. I've looked over the web, tried reinstalling git, editor, dependencies and am super confused as to what's causing this. It must be an operating system difference? Thanks!
It's trying to spawn sh.exe but can't find it.
You need to add the git directory that contains sh.exe to your system variables.
(go start and type: 'path'. This should provide you with a shortcut to 'system environment variables'. If not look up how to edit environment variables on your version of windows.)
Once you have the environment variables dialogue box open, have a look in the System variables > 'path' list. There may be a git directory there that doesn't contain sh.exe. You need to replace it with one that does (ensure this also contains git.exe).
On my pc sh.exe was found in:
C:\Program Files\Git\bin
Once this is done restart the terminal and attempt to deploy again.

Failed with error: ‘‘operator’ is not a valid installed package

Currently I am having problems with loading an R package that I downloaded from github (https://github.com/hafen/operator). I downloaded the package and put it in my local R folder: "C:/..../Documents/R/win-library/3.2/operator".
However, I have not been able to load said package into R. I keep on receiving the following errors when trying to load the package. Can anyone help me. I found an error that I though was somewhat relevant that suggest updating "Rcpp" which I have already done with no success. Thank you in advance for any and all help!
I should add. I looked into this a bit more and realized the issue I am having is revolving around the C script that is contained within the package. If I remove the C script I can load the package, however, some of the package functions are dependent on the script and will not run as a result.
> require(operator)
Loading required package: operator
Failed with error: ‘‘operator’ is not a valid installed package’
or
> devtools::load_all("C:/..../Documents/R/win-library/3.2/operator")
Loading operator
Re-compiling operator
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:\Users\blakey1\Documents\R\win-library\3.2\operator" \
--library="C:\Users\blakey1\AppData\Local\Temp\Rtmpe611i9\devtools_install_499c5059149c" --no-R --no-data \
--no-help --no-demo --no-inst --no-docs --no-exec --no-multiarch --no-test-load
* installing *source* package 'operator' ...
** libs
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="operator.dll" WIN=64 TCLBIN=64 OBJECTS="loess_op.o"' had status 127
ERROR: compilation failed for package 'operator'
* removing 'C:/Users/blakey1/AppData/Local/Temp/Rtmpe611i9/devtools_install_499c5059149c/operator'
Error: Command failed (1)
I was facing the same issue with RTextTools, as RTextTools is now not available on CRAN.
I have Download RTextTools From Given Link

https://cran.r-project.org/src/contrib/Archive/RTextTools/
and copy
RTextTools_1.4.2.tar.gz file in project root folder
then
run this command in project folder in terminal
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
After running this command I receive below error
"ERROR: dependencies ‘SparseM’, ‘randomForest’, ‘tree’, ‘e1071’, ‘ipred’, ‘caTools’, ‘maxent’, ‘glmnet’, ‘tau’ are not available for package ‘RTextTools’"
Now install each dependencies from RStudio or RConsole (Any Editor used by you) by simply running this code
install.packages("caTools")
Install all 9 required packages One By One (In My Case it was 9 Packages Dependencies required by RTextTools)
all packages will be installed except 'maxent'
Now download maxent from the given link
https://cran.r-project.org/src/contrib/Archive/maxent/
and copy maxent_1.3.3.1.tar file in project folder then
run this command in project folder in terminal
"R CMD INSTALL maxent_1.3.3.1.tar"
Now For RTextTools Run this command again in Terminal
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
All is done Now..
But the Last Step is
Load the RTextTools using
library(RTextTools)
You will see one more Error: Load SparseM
Now Loading SparseM use code below
library(SparseM)
and in the last Load RTextTools
library(RTextTools)

No interpreters available in Zeppelin

I have just installed the following on my Mac (Yosemite 10.10.3):
oracle java 1.8 update 45
scala 2.11.6
spark 1.4 (precompiled release: http://d3kbcqa49mib13.cloudfront.net/spark-1.4.0-bin-hadoop2.6.tgz)
zeppelin from source (https://github.com/apache/incubator-zeppelin)
no additional config, just copied created zeppelin-env.sh and zeppelin-site.xml from templates. no edits.
I Followed the installation guidelines: https://zeppelin.incubator.apache.org/docs/install/install.html
I have build zeppelin without problems:
mvn clean install -DskipTests
Started it
./bin/zeppelin-daemon.sh start
Opened http://localhost:8080 and opened the Tutorial Notebook.
Here is what happens when I refresh the snippets:
Here is the exception for the md interpreter in the webapp logs:
ERROR [2015-06-19 11:44:37,410] ({WebSocketWorker-8} NotebookServer.java[runParagraph]:534) - Exception from run
org.apache.zeppelin.interpreter.InterpreterException: **Interpreter md not found**
at org.apache.zeppelin.notebook.Note.run(Note.java:269)
at org.apache.zeppelin.socket.NotebookServer.runParagraph(NotebookServer.java:531)
at org.apache.zeppelin.socket.NotebookServer.onMessage(NotebookServer.java:119)
at org.java_websocket.server.WebSocketServer.onWebsocketMessage(WebSocketServer.java:469)
at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:368)
at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:157)
at org.java_websocket.server.WebSocketServer$WebSocketWorker.run(WebSocketServer.java:657)
Restarting the interpreter doesn't seem to cause errors.
Ok I have just found the answer, at the top of the tutorial there is a snippet about interpreter binding, click the save button and all start to work normally.

Resources