Cannot install react-leaflet-choropleth with npm - react-leaflet

Good day,
I am trying to install react-leaflet choropleth and have run the following in my React app's directory:
npm install react-leaflet-choropleth
This has resulted in the following errors:
Errors screenshot
(I needed to hide some info on the screenshot for confidentiality reasons)
How do I resolve these errors?

If you look into react-leaflet-chloropleth's package.json, you'll see that it has a peerDependency of react-leaflet version ^1 or ^2. You're trying to use it with react-leaflet version 3.
Newer versions of node and npm are considering legacy peer dependencies as errors (they used to be warnings), and in this case, I agree. react-leaflet-chloropleth will most certainly not work with react-leaflet version 3, and npm is letting you know that. (Not all errors of this type mean certain doom, but in this case, it does.)
React-leaflet v3 had a lot of breaking changes since react-leaflet-choropleth was written. You'll either need to downgrade to a version of react-leaflet that is compatible with this plugin (not recommended!), or rewrite it for react-leaflet v3. (Its not as hard as it sounds, and there are many other questions on here discussing how to port leaflet plugins into react-leaflet v3. start with vanilla leaflet-chloropleth).

Related

Missing CGAL/hierarchy_simplify_point_set.h file in ubuntu install

I am trying to build some source code on ubuntu 16.04 where one of the classes relies hierarchy_simplify_point_set.h header file, which is part of CGAL's point set package. After following instruction on the installation page, I have installed libcgal-dev and libcgal-qt5-dev via apt-get. The package manager has installed libcgal-dev 4.7 which should include the point set library. However, the particular header file seems to be missing (it seems to have some files from the point set library and not others - I am looking in /usr/include/CGAL). Does anyone know what I am doing wrong?
ps: For good measure, I have already tried uninstalling and reinstalling both the packages, but no luck.
This header has been introduced in CGAL 4.8 while it seems you are using CGAL 4.7.
You can get the latest version of CGAL here. Since the latest versions can be used as a header-only library, simply extract the release archive somewhere and set CGAL_DIR to that location when calling cmake to configure your example and it should work directly.

Trouble installing SUMO 0.30.0 in Ubuntu 16.04 from source code

I need to install SUMO 0.30.0 to be used with the VEINS_INET subproject in veins 4.6. I have tried following the instructions here and suggestions from forums but haven't had any luck being able to install sumo. I run ./configure (trying various tool/library options) then run sudo make but all I get is target marouter failed or nothing to be done for 'install-exec-am' 'install-data-am'.
Does anyone know how to install sumo-0.30.0 from source and/or make the veins_inet subproject work with the latest version of sumo-0.32.0?
Don't run sudo make.
Don't run sudo make.
Your problem is probably related to a dependency/packaging change in 16.04, which is explicitly pointed out in the veins tutorial:
Note that Ubuntu 16.04 no longer includes libproj0; this can be worked around by temporarily adding the packet repository of, e.g., Ubuntu Vivid when installing this package.
Short answer: Unfortunately this means that long-term, you're going to either have to package SUMO yourself, use the versions someone else compiled (see this launchpad for example) or rely on an old version.
Long answer:
In general, I would recommend building SUMO from source by building its' dependencies from source, since I've encountered this problem on various distributions. In particular, the fox, proj and gdal libraries tend to be packaged in different versions, and along with changes in the SUMO source code. I currently use this script (with the package versions downloaded) to compile SUMO -- but this is for 0.30.0, and it breaks if any of the referenced source packages are moved (which happens quite often). My general recommendation would be to either use a completely isolated version of SUMO (i.e., compiling by hand as much as possible) or relying on a pre-packaged version (see above), as long as that version is recent enough to work with VEINS.

VS Code 3rd Party Intellisense not working

I am using the latest release build of VS Code (1.13.1) and I am having some issues with the IntelliSense when trying to use 3rd party libraries.
My example is using JQuery, I have installed JQuery via NPM and imported this into my main.ts file. according to the VS Code website, the IntelliSense should automatically pick up common libraries and display functions and members that are available to that language, so when I type $ and click the '.' key I should see "ajax" for example. I can get the IntelliSense working by installing the types in NPM (npm install #types/jquery).
Am I doing something wrong that might be stopping the automated process from occuring?
Many thanks
Stuart

Using an NPM module from Ionic

I am using ionic 1.3.1 and I want to use the npm phone module here to validate phone numbers on the client side.
In looking around on how to use the npm module, I followed instructions in this SO post (last answer at the bottom) and copied the phone directory from npm_modules to www/lib. I then included the lib/phone/lib/index.js file in my index.html.
When I bring up the page with ionic serve I get the error "module not found".
I see solutions for using npm in Ionic v2 but am not ready to move to v2 yet. I also see some answers pointing towards using Browserify but I am trying to avoid having to use new tools if I don't need to - feels like there must be a simple way to use an npm module inside ionic.
Thanks for any pointers to help resolve.
Sanjay
Since I couldn't figure this out I just created an Angular service from the code in the index.js file for the npm phone module.

How to set sass with compass and coffeescript in meanio

I find mean.io (MongoDB Espress Angular Node) very interesting.
I'm used to work with coffeescript, sass and compass.
I would like to start a project with all these and not with pure js and css as the default setup does.
Is it possible to do it?
Yes it is possible but right now there is a bit of overhead required to get setup.
Have a look at https://github.com/gruntjs/grunt-contrib-coffee for info about converting coffescript to js using grunt. mean.io uses a lot of the grunt tools.
I would also recommend emailing a colleage of mine lior#linnovate.net. He has recently been building a sass package using the mean package system.
To see currently available packages have a look at http://www.mean.io/#!/packages