using highcharts with jhipster - highcharts

I'm trying to integrate highcharts to my jhipster Gateway using angular 4.
In the command line I used
>yarn add angular-highcharts#4
> yarn add --dev #types/highcharts#4
but i got this error :
./node_modules/angular-highcharts/angular-highcharts.es5.js
Module not found: Error: Can't resolve 'highcharts' in '/home/vagrant/IdeaProjects/chart/node_modules/angular-highcharts'
When I opened ./node_modules/angular-highchartsangular-highcharts.es5.js:
I got:
this import is not supported by current javascriptversion
import * as Highcharts from 'highcharts';
import { Directive, ElementRef, Inject, Injectable, InjectionToken, Input, NgModule } from '#angular/core';
Am I missing a setting somewhere?

Related

Adding bootstrap5 to vue cli project

I installed Bootstrap Vue as follows:
npm install bootstrap-vue
then i add in main.js:
import Vue from 'vue'
import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue'
import App from './App.vue'
import router from './router.js'
Vue.config.productionTip =false
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.use(BootstrapVue)
Vue.use(BootstrapVueIcons)
new Vue({
router,
render: h => h(App)
}).$mount('#app')
But I got the error in cmd:
export 'default' (imported as 'Vue') was not found in 'vue' ...

Can't import plotnine

Getting an error when trying to import plotline; I pip installed Unicode, but still seeing the same error. Not sure what else I need to install.
import plotline as p9
ImportError: cannot import name 'unicode'

How to fix find error for dart:html in VSCode?

I try to run in VSCode a simple dart program with
import 'dart:html';
clause.
import 'dart:html';
// import 'package:html/dom.dart';
// import 'package:html/dom_parsing.dart';
// import 'package:html/parser.dart';
void main() async{
var myTable = new TableElement()
..setAttribute('border','1');
// ..setAttribute(name, value);
...
In Run mode (I use VSCode extension "Code Runner 0.9.9") and in Debug appeared the same error:
Error: Not found: 'dart:html'
import 'dart:html';
I have installed Dart SDK 2.3.1 at Windows10 and not installed Flutter at all.
PATH pointed to Dart SDK bin directory
PATH =D:\Dart\dart-sdk\bin;
*) At project directory I try to add additional directive at pubspec.yaml
dependencies:
----
name: main
description: Test App sample22
dependencies:
html:
---
After "pub get" command I'll see that html present but error still persist.
pub get
Resolving dependencies...
+ charcode 1.1.2
+ csslib 0.16.0
+ html 0.14.0+2
+ path 1.6.2
+ source_span 1.5.5
+ term_glyph 1.1.0
Changed 6 dependencies!
*) My next step was to import html parts via "package:html/" (marked as comments in code sample). It is not helped and required class TableElement still unrecognizable.
"main.dart:8:19: Error: Method not found: 'TableElement'."
*) I try to change "launch.json" string from
default
"program": "bin/main.dart",
to
"program": "D:/Dart/WRK03t/main.dart",
And rename my code file to "main.dart"
*) Also I try to remove Dart extension from VSCode, restart PC and install it again. it's not helped.
But let me say that when I compile main.dart to js
"dart2js -m -o tst.js main.dart"
Resulted tst.js run correctly within the html page.
Almost the same problem in Request Dart Installation doesnt find dart:html
dart:html is only available in the browser. This is the error you get if you try to run code that uses it on the VM (instead of the browser). This is expected.
If you need to run your code outside of the browser (eg. in the VM as a CLI app or via Fluter) you cannot use dart:html. If you only want to use it in the browser but VS Code is trying to run your code in the VM, you'll need to set up some VS Code tasks/launch configs to run build_runner, similar to the Dart DevTools project:
https://github.com/flutter/devtools/tree/abe811f66e1bd36612b76bbe28250bc669a6ce08/.vscode

Import nouislider with webpack on rails

I'm trying to implement a nouislider on Rails. I installed it with Yarn and my package.json confirms this: "nouislider": "^11.1.0".
Unfortunatly I got this error on the chrome console :
Uncaught ReferenceError: noUiSlider is not defined at Object. (slider2.js:12)
here is my app/javascript/packs/application.js :
import "nouislider";
import '../components/slider2';
(where slider2.js is my noUiSlider script)
What is wrong with this importation? Why does slider2.js don't understand what is noUislider?
Try:
import noUiSlider from "nouislider";
Also going to a assume you have a file in the correct place for your second line.

Imports failed in Config.groovy file (Grails 2.2.3)

I try to run a grails app thanks to grails run-app command. Version I use is grails 2.2.3.
All imports failed and I've got the "unable to resolve class" about all import line. For example :
unable to resolve class com.octo.captcha.component.image.backgroundgenerator.GradientBackgroundGenerator
Errors are about the following lines :
import com.octo.captcha.service.multitype.GenericManageableCaptchaService
import com.octo.captcha.engine.GenericCaptchaEngine
import com.octo.captcha.image.gimpy.GimpyFactory
import com.octo.captcha.component.word.wordgenerator.RandomWordGenerator
import com.octo.captcha.component.image.wordtoimage.ComposedWordToImage
import com.octo.captcha.component.image.fontgenerator.RandomFontGenerator
import com.octo.captcha.component.image.backgroundgenerator.GradientBackgroundGenerator
import com.octo.captcha.component.image.color.SingleColorGenerator
import com.octo.captcha.component.image.textpaster.NonLinearTextPaster
Here you can read these 2 files : Config.groovy and the return of "grails run-app" to help you : http://dl.free.fr/vPbCJEUnN
Thanks for your help !

Resources