The instructions for madge are only good for a linux system (it requires sudo to get the command line part set up). Is there a way to run it on windows?
It turns out to be very simple. To install madge:
npm install madge
Then to set it up for the command line:
npm -g install madge
You can then run it with a command of:
madge
For typescript generate .js files do:
madge -f amd -c .
and you'll get the circular report. You need the "-f amd".
Related
I would like to open VSCode from my RHEL terminal using the code command but when I try to type Shell Command: Install 'code' command in PATH directly in VSCode Command Palette, it indicates that No matching command is found. Is there a way to configure $PATH directly via the command line to make code work?
Finally what worked for me was to run the following commands :
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
dnf check-update
sudo dnf install code
I want to use mongodb driver.But I get the following error:
go.mongodb.org/mongo-driver/vendor/github.com/DataDog/zstd
exec: "gcc": executable file not found in %PATH%
The issue is that your library depends on gcc to run.
1. Linux/Containers
If you are running in a container, you can try two options:
you can build your app without CGO with the following command:
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o yourBinary
You can try to install gcc into your container. If it is an alpine based container, run
RUN apk update && apk add --no-cache gcc
You could also need musl-dev package, but you should try without it first.
2. Windows
Since MacOS and most Linux distros come with GCC, I guess you could be using Windows. In this case, you need to install MinGW.
I know this is old but I ran into this problem too, About Alexey answer, on windows, you should install MinGW and add the path to win environment. You should follow this. In case MinGW did not work, you can install this one which worked perfectly for me on windows.
I am trying to activate cpplint within vs code. I have installed it in Anacanda environment where executable
/home/ubuntu/anaconda3/bin/cpplint
I have a link to it
ls -l /home/ubuntu/anaconda3/bin/cpplint
Unfortunately per visual code cpplint extension still getting error of "Cpplint could not find executable"
Please, advice to configure it correctly.
Download and install
sudo apt-get install python-pip
pip install --user cpplint
Verify install result
ls -l /usr/local/bin/cpplint
If you still have issues check cpplint.cpplintPath and verify the execution path is set correctly.
Also, if you installed cpplint into ~/.local/ directories, by default ~/.local/bin is not included in PATH. So to fix just that add:
export PATH=$PATH:~/.local/bin/
to your ~/.bashrc
I am using Linux Mint 18. I installed Python 3.5 and 3.6 using apt-get in the terminal. I can open IDLE of Python 2.7 and 3.5 using commands idle and idle3 respectively. How can I access IDLE that comes with Python 3.6?
Try the command idle3.6. python3 and idle3 are still associated with your system Python, which is 3.5.
Simply typing in idle3.6 should work just like carusot42 mentioned. If it doesn't work, perhaps you might want to see if everything else is installed correctly. Here are the steps I followed which worked perfectly fine for me. I am also running Linux Mint 18. The steps that I followed were:
Installed the prerequisites of Python. Do that by typing in the following commands -
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Download Python using the following command and extract it (use your desired location) -
cd /usr/src
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
sudo tar xzf Python-3.6.0.tgz
The next step is to compile Python source. To do that type in the commands below-
cd Python-3.6.1
./configure
sudo make altinstall
make altinstall is used to prevent replacing the default Python binary
file /usr/bin/python
You should be good to go. You check your Python version by typing python3.6 -V in the terminal.
Once you do that, type in idle3.6 and then Python 3.6.1 shell should open for you.
The Software Manager in Linux Mint lists the Python Packages and IDLE Packages
separately. After you install Python, go look up the associated IDLE package in the Software Manager and install it. Reboot and it should work fine. It worked for me.
I installed casperjs for the first time and ran the sample scripts. The first sample script (javascript) ran without incident. Then i tried running a coffescript sample, which I prefer, and received the following error:
Unable to load script test.coffee; check file syntax
I searched for an answer and the solution in the only related issue didn't work for me. I was able to compile the CoffeeScript (test.coffee) into JavaScript (test.js) and then ran the compiled JavaScript, again, without indecent.
I tried to track down the error by searching for the error message in the casperjs files. I found the error message at the end the ~/.node/lib/node_modules/casperjs/bin/bootstrap.js file where it passes control to phantomjs. I created simple a CoffeeScript: test_phantomjs.coffee:
console.log "hello phantomjs"
phantom.exit()
and ran the script (phantomjs test_phantomjs.coffee) with the following result:
Can't open 'test_phantomjs.coffee'
At this point I'm at loss. The problem is more of an inconvenience than anything since compiling into JavaScript solves the issue. Is their something I'm missing?
In Phantomjs2.0 was removed support of coffee-script
https://github.com/ariya/phantomjs/issues/12410
(disclaimer: i'm/was part of contribution team)
the support of coffee script in CasperJS depends on the version of phantomJs you are using because this is phantomjs that provide coffee script support out of box.
You can also use and install slimerjs (https://slimerjs.org) which - from my point of view - is more performant than phantomjs and supports coffeescript scripts.
Mickaël
Works for me. Can you post your PhantomJS version and platform?
Mine on Mac OS X:
$ phantomjs -v
1.9.8
Just works:
$ phantomjs test_phantomjs.coffee
hello phantomjs
As others say, PhantomJS v2.x no longer supports CoffeeScript.
Therefore, now you have 2 options to run PhantomJS with CoffeeScript:
Run plain *.coffee files with PhantomJS v1.9.8
Compile *.coffee files to *.js, and run *.js with PhantomJS v2.x
I recommend the latter up-to-date way, and this is how package.json looks like:
{
"scripts": {
"pretest": "npm install && coffee --compile **/*.coffee",
"test": "casperjs test --fail-fast script/*.js",
"watch": "coffee --watch --compile **/*.coffee"
}
}
See more detail at ymkjp/phantomjs2x_coffee_sample.
Btw, here's the way to install PhantomJS v1.9.8 on Ubuntu.
$ sudo apt-get update
$ sudo apt-get install build-essential g++ flex bison gperf ruby perl \
libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev \
libpng-dev libjpeg-dev python libx11-dev libxext-dev git
$ cd ~
$ wget -O- https://github.com/ariya/phantomjs/archive/1.9.8.tar.gz | tar zxvf -
$ cd ~/phantomjs-1.9.8
$ bash build.sh # It takes 30 min or so (Up to your host machine)
$ sudo ln -s ~/phantomjs-1.9.8/bin/phantomjs /usr/local/bin
$ phantomjs --version
1.9.8
Cheers.