Categories
Mastering Development

Error TS2440 (TS) Import declaration conflicts with local declaration of ‘PluginConfig’

I am trying to run my application in Visual studio 2017 and I keep getting the error: “Error TS2440 (TS) Import declaration conflicts with local declaration of ‘PluginConfig'” I tried downgrading my typescript, but the error is not going away. Below is my package.json file: { “name”: “frontend”, “version”: “0.0.0”, “license”: “MIT”, “scripts”: { “ng”: […]

Categories
Mastering Development

Run Quill editor with TypeScript

I have a working example of the WYSIWYG-editor Quill from the Quill site. The following code just has to be copied into an HTML file such as example.html and there will be a simple text editor example: <!– Include stylesheet –> <link href=”https://cdn.quilljs.com/1.3.6/quill.snow.css” rel=”stylesheet”> <!– Create the editor container –> <div id=”editor”> <p>Hello World!</p> <p>Some […]

Categories
Development

Perform axios request with SSL certificates React JS

I’m try to query Puppet DB API (https://puppet.com/docs/puppetdb/latest/api/query/tutorial.html) using the SSL certificates for authentication. So in my component called Version.js I did the following (not complete code): import fs from ‘fs’; import axios from ‘axios’; import https from ‘https’; import { readFileSync } from ‘fs’; let versionAPI = ‘https://puppetdb:8081/pdb/query/v4/version’; let agent = new https.Agent({ cacert: […]

Categories
Development

How can I set up polyfills correctly so that my Vue.JS website works on Internet Explorer 11?

I have a project built with Laravel and Vue.JS (Using Bootstrap-Vue also). Everything works as it should on all browsers including Edge. But as you guessed it, not in IE11. I have tried various configurations of using babel/polyfills. In my webpack.mix.js I have the following code: let mix = require(‘laravel-mix’); require(‘laravel-mix-polyfill’); mix.js(‘resources/js/app.js’, ‘public/js’) .sass(‘resources/sass/app.scss’, ‘public/css’) […]

Categories
Development React

reactJS “npm run build” not taking last updated

I have a small project done with ReactJS and node.js I build it with npm run build to serve the files Now the update i does on my src are not in the build. for example i changed the html code and api calls. I tried of course to clear the browser cache, using another […]

Categories
Development React

Module not found: Can’t resolve ‘react-datepicker

I’m trying to use date picker in a MERN tutorial, but it fails to compile because it can’t resolve ‘react-datepicker’. I’ve rm -rf node_modules and datepicker to no avail. component.js import axios from ‘axios’; import DatePicker from ‘react-datepicker’; import “react-datepicker/dist/react-datepicker.css”; package.json “dependencies”: { “axios”: “^0.18.0”, “bootstrap”: “^4.3.1”, “react”: “^16.8.6”, “react-datepicker”: “^2.5.0”, “react-dom”: “^16.8.6”, “react-router-dom”: “^5.0.0”, […]

Categories
CSS Development Vue

Vue.js production build problem – “CssSyntaxError app.css:1:1 Unknown word”

Attempting to build a production version of my app is failing – with the ‘Unknown word’ error message. Last week, of course, everything was fine. I’ve checked the contents of all the style tags within the components and there are no HTML tags nor are there any comments. I’ve progressively removed the style tags from […]

Categories
CSS Development jQuery Vue

postcss is processing /css/app.css and throwing CssSyntaxError after import vue2-daterange-picker

I’m writing a SPA with vue in a laravel project, and build assets with laravel mix(npm run watch etc.) Everything is fine before I import vue2-daterange-picker in a vue component. npm run watch and npm run develop are good. But when I run npm run production It’ll throw an error like this CssSyntaxError: /css/app.css:3:19: Missed […]

Categories
Angular Development

Angular 7 IE11 not working. Getting SCRIPT1002 Syntax Error vendor.js

I’m running an Angular 7 application and I’m trying to run it in IE11 and its showing me this error: “SCRIPT1002: Syntax error ” “vendor.js” and the web page shows as a blank page. In other browsers its working fine. I have tried with uncomment polyfills and also tried with adding below line in index.html […]

Categories
Bootstrap Development

Bootstrap Hamburger not opening

I have followed step by step procedure for the implementation of Hamburger in navbar. However on resizing windows the navbar is collapsing but it is not opening on clicking it. Please refer to the below sample code for reference. I’m using bootstrap4 & angular 6 version. <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js”></script> <script src=”https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js”></script> <nav class=”navbarc navbar-expand-lg navbar-dark shadow-sm […]