Adding bootstrap5 to vue cli project - bootstrap-5

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' ...

Related

MatNativeDateModule, MatMomentDateModule not found in angular 9.1.1

Old angular/material has those two modules. but angular/material 9.1.1 version has not those two module. I got below error. Anyone has any idea how to import those two module
Uncaught (in promise): Error: MatDatepicker: No provider found for DateAdapter. You must import one of the following modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a custom implementation.
Error: MatDatepicker: No provider found for DateAdapter. You must import one of the following modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a custom implementation.
Angullar 8,9
import { MatDatepickerModule } from '#angular/material/datepicker';
import { MatNativeDateModule } from '#angular/material/core';
Angular 7 and below
import { MatDatepickerModule, MatNativeDateModule } from '#angular/material';
You need to import both MatDatepickerModule and MatNativeDateModule under imports and add MatDatepickerModule under providers
imports: [
MatDatepickerModule,
MatNativeDateModule
],
providers: [
MatDatepickerModule,
MatNativeDateModule
],
In case you're looking for the MatMomentDateModule, it does not come by default, you will need to install
#angular/material-moment-adapter separately
npm install --save #angular/material-moment-adapter
In case you face the issue that the peer dependency Moment.js is missing, install it with
npm install --save-dev moment
Then go ahead and import the MatMomentDateModule in the module file
import { MatDatepickerModule } from '#angular/material/datepicker';
import { MatMomentDateModule, MAT_MOMENT_DATE_ADAPTER_OPTIONS } from '#angular/material-moment-adapter';
#NgModule({
declarations: [
...
],
imports: [
...
MatDatepickerModule,
MatMomentDateModule
],
providers: [
{provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: {useUtc: true}}
]
})
export class MyModule {}
Read more at Angular Material Datepicker component

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'

why import { version} from './package.json' in rollup.config file prompts version is not defined

I have these two ways to import version from my package.json file. And it prompts error says Error transforming bundle with 'rollup-plugin-license' plugin: version is not defined. Please see my following code.
import pkg from "./package.json";
import {version} from "./package.json";
import license from 'rollup-plugin-license';
export default {
input: './src/a.js',
output: {
file: 'a.js',
format: 'cjs',
},
plugins: [
license({
banner: `V<%= pkg.version %>`, //this works fine
banner: `V<%= version %>`, //prompts version is not defined
}),
]
};
banner: `V<%= pkg.version %>, //this works fine
This statement works because you're importing your package.json into pkg with: import pkg from "./package.json"; and your package.json is a JSON object so you can use dot notation to reference properties of a JSON object. In this case, the version property of the package.json. However, this fails: banner: <V%= version %>, //prompts version is not defined because you haven't defined a version export in your package.json so when you use: import {version} from "./package.json"; version is undefined. See: https://medium.com/#trekinbami/a-not-so-in-depth-explanation-of-es6-modules-import-and-export-13a80300f2f0 for a quick explanation on ES6 importing/exporting modules.

using highcharts with jhipster

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?

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