Questions tagged [javascript]
JavaScript is a prototype-based scripting language
154
questions
1
vote
1
answer
101
views
node/nvm/npm installations : sudo vs. user install leads to trouble?
The problem appears to be inconsistency with root and user installed node (v.19.7.0), nvm (0.39.3), and npm (v. 9.5.0) and a specific npm-installed package called svg-path-interpolator on an Ubuntu 22....
1
vote
1
answer
1k
views
insomnia on ubuntu Gtk-WARNING **: 18:49:38.190: Theme parsing error: gtk.css:1413:23: 'font-feature-settings' is not a valid property name
I have this problem when I try to open insomnia on ubuntu and I don't want to delete it so I don't lose my work
has anyone had this problem?
A JavaScript error occurred in the main process Uncaught
...
1
vote
3
answers
1k
views
System tray icons all disappeared
I'm running Ubuntu 20.04.5. Recently all of my system tray application icons (e.g. Dropbox, Discord) disappeared, and restarting did not help. When I run Dropbox or Discord from terminal, their ...
0
votes
1
answer
753
views
Websocket sending blob object on live server and string on local server
I am new to Ubuntu and recently created a project with WebSocket.
Everything works as expected on local server but on live server I get following error:
Uncaught SyntaxError: Unexpected token 'o', &...
0
votes
0
answers
192
views
GJS imports source files
I'am writing my own small extension for GNOME.
For an IDE i use Visual Studio Code. As usually at the beggining of extension.js there are some imports:
const Main = imports.ui.main;
const St = imports....
0
votes
1
answer
317
views
browsers do not fetch any javascript file in a specific domain
I am running ubuntu 20.04
I have problem while opening beisat.org
When I view page source there is no <script> tag and no js file is loaded.
But I can load other websites correctly. Also I have ...
0
votes
0
answers
518
views
Error while uploading a file to Postman with some other fields with nodejs
I am getting the following errors when doing some changes but they never get resolved
node:internal/fs/utils:670 throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path); ^ ...
0
votes
0
answers
405
views
"grunt run" doesnt work in sudo mode(Ubuntu 20.04.2)
~/Desktop/editify$ sudo -s
root@kritidipto-HP-Laptop-15-bs0xx:/home/kritidipto/Desktop/editify# grunt run
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'liftoff'
...
2
votes
1
answer
4k
views
Cannot use JavaScript inside PDF with Firefox
I am having troubles using JavaScript in a PDF file opened with Firefox.
To sum up, it is a file that uses XFA forms and JavaScript to validate the form and generate a QrCode. Here is the link to the ...
2
votes
3
answers
3k
views
Where is the JSON Config File for Discord Installed Via Snap?
The only .json files I can find are build_info and manifest (I don't think either of them are config files).
Forgive me if my question is too amateurish, I just installed Ubuntu recently. I'm trying ...
0
votes
0
answers
264
views
Firefox snap version in 21.10 CORS problem
After upgrading to 21.10, I run into a CORS problem with an HTML page that uses Javascript fetch() to GET a page from a server. Same page does not have problems with Chromium under 21.10 (or Firefox ...
0
votes
1
answer
435
views
Ubuntu server running a proxied Node/JS web app with Apache2 gets weird connection failure
Like this, I am running an Express JS app trough Apache (note retry=0 is important):
...
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
<Proxy *>
Require all granted
&...
0
votes
1
answer
773
views
After Update to 21.04 Apache Not Fully Installed and JavaScript Not Working
Apache is running and is serving pages but it seems to have been only partially updated during the upgrade and prevents further updates.
sudo apt upgrade
Reading package lists... Done
Building ...
0
votes
0
answers
61
views
Is there any trick to collecting data from a web page that using JavaScript and setting current time and date automatically?
I work under Ubuntu Linux in the terminal, using shell script wget, httrack and:
google-chrome --headless --dump-dom 'https://www.pref.kanagawa.jp/sys/taikikanshi/kanshi/realtime/index.html' > ~/...
0
votes
0
answers
179
views
Monitoring battery percentage using Gjs
I was looking to this answer to get an idea of how to get the value of the battery percentage. I modified the example using this documentation to the following code:
const Gio = imports.gi.Gio;
const ...
0
votes
0
answers
332
views
Accesing UPower battery percentage via DBus in gjs: Access Denied
I am trying to make an extension that displays a notification when the battery level reaches certain value. To get the percentage level I am trying to implement this method, but as I don't have a ...
2
votes
1
answer
53
views
Which package do I have to install to get `gjslint` in Ubuntu 21.04?
I've been using gjslint to verify that my JavaScript code is valid before sending it to my servers. Very practical.
In older versions (16.04, 18.04), it was found in the closure-linter package.
In ...
0
votes
1
answer
32
views
How to use npm file-storage package?
I learn Javascript and don't even know, how exactly use FileStorage object.
var storage = new FileStorage(...); // supply valid credentials
The package link: https://www.npmjs.com/package/file-...
0
votes
1
answer
1k
views
Terminal not outputting result in Visual Studio Code
I'm fairly new to programming and I'm learning Node.js. When testing my installation of node.js and VS code, I just wanted to run a console.log('Hello');, but the terminal is not outputting anything ...
0
votes
1
answer
853
views
Installing Ganache GUI in Ubuntu
How exactly is Ganache installed on Ubuntu?
The approach of using git looks advantageous, yet, I'd expect a sort of wrapper around git for use from within npm or similar.
Or does this have to be ...
1
vote
1
answer
386
views
REACTJS local server freezes my Ubuntu
Whenever my reactjs app is starting, my Ubuntu os freezes and I use Firefox not chrome because of memory management. What could be the cause? Thanks in advance.
0
votes
0
answers
265
views
Escape HTML in bash ( Ubuntu server )
I have already html file ( Form ) that contains HTML Tags , css , Javascript and some of XOR cipher
I used a website to escape HTML then I write in bash file:
header= ' The HTML code after the ...
6
votes
2
answers
2k
views
Where are gnome-shell's UI javascript files on Ubuntu 20.04?
I have found the source code of gnome-shell UI js files on the Debian website:
https://sources.debian.org/src/gnome-shell/3.38.2-1/js/ui/
Then I have also found this answer here, which points out that ...
0
votes
1
answer
4k
views
What is the problem with node_modules (or npm) PPA on Ubuntu
I started to use Ubuntu last year and since today I face really annoying problems. Firstly the problems were Reactjs with script errors which I couldn't even start a project, anyway I solved in ...
2
votes
0
answers
8k
views
“SyntaxError: Cannot use import statement outside a module”: occurs on Ubuntu, but not on Windows
I work with this assembly: https://github.com/andreyalexeich/gulp-scss-starter
It works for me on Windows. But on Ubuntu, right after the run command (gulp, or npm run dev, or yarn run dev) does not ...
3
votes
1
answer
161
views
Nemo-preview throws out JS error
My system is Ubuntu 20.04, I download nemo-preview from the repository of Linux Mint and installed it manually. No error or warning shows in the installation. But nemo-preview does not function when I ...
2
votes
1
answer
3k
views
What is the simplest way to run Javascript code on Ubuntu?
I tried to use browsers' console, but it interprets print as command to print a document, not as output on the console.
I heard about some JavaScript Shell, but didn't quiet get how to install and use ...
1
vote
0
answers
1k
views
Internet Explorer 8 on Wine Ubuntu 18.04
I recently installed IE8 on my Ubuntu 18.04 laptop using Wine and Winetricks. The installation has completed successfully but the .exe file located in /home/woop/.wine/drive_c/Program Files/Internet ...
-1
votes
2
answers
4k
views
I am always getting the error "address already in use :::3000"
Error: listen EADDRINUSE: address already in use :::3000
at Server.setupListenHandle [as _listen2] (net.js:1280:14)
at listenInCluster (net.js:1328:12)
at Server.listen (net.js:1415:7)
0
votes
0
answers
5k
views
Selenium chromedriver doesn't load javascript in webpage
I'm running python code in a VPS with Ubuntu 18. After much trying, I was able to run the selenium Chromedriver there headfully. Now, I'm finding that the webpages sometimes loads fully, but more ...
1
vote
1
answer
725
views
Is there a way to use setTimeout in Gnome Shell Extension code?
I am trying to code a gnome-shell extension. It uses Javascript. But one major problem when I want to use setTimeout() it tells me this in the log: ReferenceError: setTimeout is not defined, what I am ...
2
votes
0
answers
1k
views
""gjs-console" closed unexpectedly" error message
Mine is Ubuntu 18.4. I get the following error message frequently.
"Sorry the program "gjs-console" closed unexpectedly your computer doesn't have enough memory"
Sometimes the ...
0
votes
1
answer
1k
views
Using environment variables with Node.js
I am trying to prepare my app for production on a ubuntu running nginx. I have been using the dotenv npm package during development, but need a more stable and secure method for production. I have ...
1
vote
1
answer
135
views
Installing Jmemorize (flashcard) on Ubuntu
I want to install jmemorize (flashcard app) that I downloaded from sourceforge (link below) on ubuntu. It might be very simple that the developer didn't bother himself to explain but I'm stuck in it ...
0
votes
1
answer
2k
views
How do I install an SSL certificate in order to serve a local web application?
I need to install a local SSL certificate so that the browser trusts it. The tutorial Running Angular CLI over HTTPS with a Trusted Certificate has instructions for OS X and Windows, but not Ubuntu.
...
2
votes
2
answers
6k
views
Puppeteer on Ubuntu 16.04 doesn't work
Is it possible to run Puppeteer on Ubuntu Server 16.04? I get this error.
(node:23213) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/root/bin/node_modules/puppeteer/...
1
vote
0
answers
452
views
RTSP to HTT using VLC command line
I have a camera which gives output in form of RTSP. However we want to run it on a browser inside HTML tag. For which we need HTTP url using terminal. I saw few posts which uses cvlc but I was not ...
1
vote
0
answers
507
views
Cannot run UglifyJS on Ubuntu 18.04
I installed UglifyJS on Ubuntu 18.04 using:
sudo apt install node-uglify
And then I tried to run uglifyjs command, but got error messages:
$ uglifyjs -h
internal/modules/cjs/loader.js:638
throw ...
5
votes
3
answers
31k
views
what is the location of node-modules
I want to see my all packages and modules of node-module. Please tell me its the location in ubuntu 18.04. such as /path/to/node-module. Moreover, How to see the code of modules such as http module or ...
3
votes
1
answer
754
views
Caprine (messenger client) fails to start
I am used to use Caprine as my messenger client on Ubuntu. However, after few months of using in with Ubuntu 18.04 it simply fails to start giving this exception:
nicnajder@nicnajder:~$ caprine
A ...
2
votes
1
answer
916
views
Interfacing DBus using gjs
I am extremely new to gjs and I want to interface dbus. I want to create a service and listen to it.
A small example or guide would be useful.
Thank You
2
votes
1
answer
160
views
pass return value from firefox process to linux shell?
I want to ask about, how to pass any value from Firefox process to Linux shell?
my case is, I want to create a Linux script tool to calling webpage using Firefox,
after any process in Firefox is done,...
3
votes
1
answer
7k
views
Modifying Large JSON Files in Linux
I have a need to modify large JSON files that choke most editors (meaning: most editors will take a long time to open the file, and even after the file is loaded, the editor will become unresponsive ...
1
vote
0
answers
234
views
How do I send a .js command from the terminal to a website?
I'd like to access these things from terminal:
Open a page in Chromium
Execute a JavaScript command (like these in the console, when you click on "Inspect element")
Kill the page.
How do I send the ...
4
votes
1
answer
1k
views
gnome freezes with high CPU use of gnome-shell (JS ERROR)
Every now and then my gnome session freezes completely with gnome-shell using 100% CPU. The only thing I could do so far was to switch to a virtual terminal and kill gnome-shell. After that the gnome ...
0
votes
1
answer
1k
views
npm is not updating my node.js correctly
I have a js code that I want to run on a remote Ubuntu 16.04. And node -v is not showing the same results like nodejs -v. Well this happened after using npm update(the script I need to use asked for ...
0
votes
1
answer
315
views
How to install and use angularjs on ubuntu18.04?
Can anyone share me how can I use angularjs latest version. I want to do project on angularjs.
1
vote
1
answer
128
views
Unable to upload .amr files in Ubuntu?
I'm trying to upload media files to a website I'm maintaining. The latest one to be added is .amr (test file from here) and it's causing problems, but only with Ubuntu. It works fine on Mac OS (High ...
1
vote
0
answers
131
views
I am getting an error when I am checking npm version
I am getting an error when I hit npm -v. Actually this happent after I tried a command to update my npm version from 3.5.2 to version 4 or higher. The command I used:
sudo ln -sf ~/.nvm/versions/node/...
0
votes
1
answer
4k
views
Node.js "UserLogged" function returning "undefined". Why? [closed]
When I get to the end of the code below, it always returns "undefined" and I don't know why!
function UserLogged (session) {
if (session === null) {
var err = new Error('Not logged in');
...