soffice not found, even though libreoffice buildpack is installed - heroku server - javascript

I am using a npm package called libreoffice-convert which needs libre office installed to work. I have installed the libre office build pack on the heroku server where this node app is deployed however whenever I try and run this package I still an get Error: Could not find soffice binary

Related

Laravel Mix HMR Server Does Not Launch

Laravel Mix Version: 6.0.43
Node Version (node -v): 16.13.1
NPM Version (npm -v): 8.1.2
OS: Windows 10 21h2
Description:
THIS IS HAPPENING ON A FRESH NEW INSTALL OF LARAVEL AND MY OTHER PROJECTS
Running npm run hot changes the script tag sources to http://localhost:8080/*/*.* from http://localhost/*/*.* HOWEVER I always get net::ERR_EMPTY_RESPONSE from localhost:8080. The HMR server doesn't launch at all. The terminal output of the command also have no mention of spinning up a new web server.
PS C:\Users\Eric Wang\Documents\GitHub\test-laravel-mix> npm run hot
● Mix █████████████████████████ emitting (95%)
emit
● Mix █████████████████████████ done (99%) plugins
WebpackBar:done
✔ Mix
Compiled successfully in 5.51s
Laravel Mix v6.0.43
✔ Compiled Successfully in 5336ms
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┐├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┤│ css/app.css │ 47.6 KiB │└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┘webpack compiled successfully
Here's a picture of the browser failing to fetch the bundle files
Steps To Reproduce:
I am running Docker 4.5.1 using legacy Hyper-V.
I containerized Laravel and PHP BUT not the frontend and JS. I am running Laravel Mix on my main system.
Clone the fresh installation of Laravel from https://github.com/ericwang401/test-laravel-mix
Clone Laradock in the project folder using git clone https://github.com/laradock/laradock.git
CD to the Laradock folder and make .env file with cp .env.example .env
Inside .env file set PHP_VERSION to PHP_VERSION=8.0 AND DO NOT EDIT MYSQL SETTINGS
Now edit the Laravel environment file
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=default
DB_USERNAME=default
DB_PASSWORD=secret
Start up the Laravel app in Laradock folder using docker-compose up -d nginx mysql
Enter into bash mode in the Docker container docker-compose exec workspace bash
Install Composer dependencies BUT NOT NPM DEPENDENCIES YET composer i
Now exit out of the Docker container CNTRL + D
Install NPM dependencies in project root ON YOUR MAIN SYSTEM npm i
Run on your main system npm run hot
Now go to http://localhost and IT SHOULD be a white screen
Check console logs and it should give net::ERR_EMPTY_RESPONSE when it tries to fetch the bundle files
REMEMBER: the backend is running inside Docker
The frontend (Laravel Mix) is running on the host system
This issue is happening on a FRESH project installation of Laravel 9 + Jetstream AND it's also happening on my other older projects like https://github.com/StratumPanel/Stratum-Panel
The HMR server is simply not launching.
I found out the issue. The problem was that the default port, 8080, Laravel Mix HMR was using couldn't be binded to. Webpack Dev Server doesn't respond with a message of failing to bind to a port. To confirm this issue, I replicated the environment on my friend's PC and it too couldn't bind to port 8080, but this time it reported an error that the dev server couldn't bind to port 8080.
I fixed this issue by specifying
mix.options({
hmrOptions: {
host: 'localhost',
port: 4206
}
});
And it works! On both my friend's pc and my pc.
I used the exact same reproduction instructions on my friend's PC.
I spent way too long investigating this issue 😭

Meteor unable to start Mongo server on windows 8.1

so I was trying to learn Meteor.js. I installed Chocolaty on my windows 8.1 machine, and with the command choco install meteor, I was able to successfully install meteor using Windows Powershell.
I created a new meteor project using the command meteor create demo and started the project using meteor command. Here's where I get Mongo server error, which says-
Unexpected mongo exit code 3221225781. Restarting.
Can't start Mongo server.
The server never starts and the process exits.
I tried uninstalling meteor and reinstalling with the same command as I mentioned above, but I am still facing the same error.
Please help.

deploying js with python and spacy lib

I have never setup things this way, I got it running locally but have no clue how I should have do it when I deploy it into an ec2 server
I have a node app running already in ec2 server but recently I have added spaCy into one of my api.
The basic logic is calling the api which runs node and part of the js script uses spawn to process the proc.py file and do some calculation with outputs.
I have tried the following below to setup on my server but of course it failed when calling the api
my original node app is in /var/www/myApp
I used sudo apt install virtualenv then inside my /var/www/myApp I ran the command virtualenv venv which creates the virtual environment...
I did a source venv/bin/activate to get into the virtual environment
Then I started running the commands to install spacy mentioned in the spacy documentation https://github.com/explosion/spaCy
used this command to install pip install -U spacy and python -m spacy download en
Then I ran python -m spacy validate to see if spacy is installed which I got
Installed models (spaCy v2.0.11)
/var/www/myApp/venv/local/lib/python2.7/site-packages/spacy
TYPE NAME MODEL VERSION
package en-core-web-sm en_core_web_sm 2.0.0 ✔
link en en_core_web_sm 2.0.0 ✔
which I believe this means the installation is a success.
But after this, I am not sure what I should do to continue.
I tried running my api but getting this as an error message "err": "Traceback (most recent call last):\n"
I would believe the spacy module is not being called that's why I am getting this error but I am not sure what I should do to get this working.
Would really appreciate for any help, thanks in advance for any advices.
EDIT:
my proc.py code is below
if __name__ == '__main__':
import sys
import json
import spacy
nlp = spacy.load('en')
text = sys.argv[1]
doc = nlp(text)
all_noun_tokens = [ token.lemma_ for token in doc
if (token.pos_ == 'PROPN'
or token.pos_ == 'NOUN'
or token.tag_ == 'NN'
or token.tag_ == 'NNP') ]
print(json.dumps(all_noun_tokens))
P.S. I am wondering if there's any config that I need to do in order for my app to find where the virtuanenv is so it can detect the spacy module?

Building Meteor app returns Error: EPERM, symlink

I'm attempting to build a Meteor application in an offline environment, with local web servers but no access to the outside Internet.
On running meteor build ./output I get the following:
...AppData\Local\.meteor\packages\templating\1.1.9\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:116
throw error;
Error: EPERM, symlink '..\babylon\bin\babylon.js'
This application runs fine in localhost, doesn't seem to have any issues, but on attempting to build or bundle the app I run into these issues.
Additional (perhaps useful) info:
meteor build ./output --verbose returns the following (unnecessary packages omitted)
Local package version is up-to-date: templating#1.1.9
Local package version is up-to-date: templating-tools#1.0.4
Thanks
You need to run meteor as an administrator, then it can create the symlinks.

Node.js, IIS, Angular and Visual Studio

So, I am a following a tutorial that uses angular seed to write my first angular application.
Angular seed comes with a web-server.js file that essentially runs a node server so you can emulate a web server. The tutorial calls for starting the server in the command prompt.
The issue is that every time I run the file for starting the Node server, Visual Studio 2013 opens and then eventually tells me that access has been denied. This is not the intended result.
Do I need to set up IIS for use with Node? Why is VS opening when I start a node web server from the command prompt??
At present .js files are configured to run with VS in your Windows.
http://nodejs.org/download/ - you need to Download and Install node.js for Windows and make sure node is in PATH and you can run it from windows prompt cmd.
C:\> node -v
v0.10.22
To run angular seed web server, simply run go to the web-script.js's directory and run the it with node:
cd angular-seed/scripts
node web-server.js

Categories