'toLowerCase' of undefined error in canMerge.js for css loading - css

Getting a weird error on ng serve
styles.css - Error: styles.css from Css Minimizer
TypeError: Cannot read property 'toLowerCase' of undefined
at /Users/pavlos-mac/projects/internal_portal/internal_portal/styles.css:73837:1
node.value is undefined in canMerge.js which is part of the css loading.
const hasInherit = node => node.value.toLowerCase() === 'inherit';
Any ideas?

Related

TypeError: Cannot set property scrollHeight of [object Element] which has only a getter

I am using PrimeNg v11.x element. Application is working fine with scrollHeight value set from a variable but the jasmine test is failing with error:
TypeError: Cannot set property scrollHeight of [object Element] which has only a getter
<p-tree
#tree
[value]="nodes"
selectionMode="checkbox"
[scrollHeight]="scrollHeight"
virtualScroll="true"
virtualNodeHeight="33"
></p-tree>
The test succeeds if i hard code the height value.
Can anyone help how to fix this issue?
Thanks
Try this it may help you. import the module that you are using like TreeModule.
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TreeModule],
declarations: [Componentsdeclaration],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();
})
);

Failed to resolve module specifier "cesium"?

I have a module "Main.js"
import * as Cesium from "cesium";
let map: Cesium.Viewer = undefined;
let createTheMap = function()
{
if (map === undefined )
{
map = new Cesium.Viewer( "mapViewDiv",
{
timeline: false,
animation: false,
infoBox: false,
navigationHelpButton: false,
fullscreenButton: false,
geocoder: false,
shadows: false,
selectionIndicator: false
});
}
map.zoomTo(map.entities);
};
inside the "index.html" i have referenced the main as follow :
<script src="verot/edi/Main.js" type="module"></script>
and cesium.js as follow:
<script type="module" src="cesium/Source/Cesium.js"></script>
I have set in Visual Studio:
ECMAScript : Ecmascript 6
JSX compilation on TSX file : React
Module System : ES2015
I am receiving the following error :
Uncaught TypeError: Failed to resolve module specifier "cesium". Relative references must start with either "/", "./", or "../".
What is causing this error, and how to fix it ?

Laravel & Vue warning issue

I have worked on Laravel & Vue js project.
This is Laravel code
The code works well but there is a warning in developer mode (inspect)
Laravel View code
#extends('layouts/app')
#section('content')
<div id="app">
</div>
#endsection
app.js code
const router = new VueRouter({ mode: 'history', routes: routes});
const app = new Vue(Vue.util.extend({ router }, App)).$mount('#app');
app.js:74791 [Vue warn]: Cannot find element: #app
warn # app.js:74791
query # app.js:79817
./node_modules/vue/dist/vue.common.dev.js.Vue.$mount # app.js:86018
./resources/js/app.js # app.js:86329
__webpack_require__ # app.js:20
0 # app.js:86576
__webpack_require__ # app.js:20
(anonymous) # app.js:84
(anonymous) # app.js:87
app.js:74791 [Vue warn]: Property or method "single" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> <Overlap> at resources/js/components/OutwardComponent.vue
<Root>
Your div that needs to reference the Vue should be in Layout file,
It might be possible that your div is rendering after the Vue Initialization.
Put <div id="app"></div> in layouts/app file and see if its gone or not.

CSSTransition not importing - type is invalid

I've installed react-transition-group and am calling it with:
import { CSSTransition, TransitionGroup } from 'react-transition-group'
I am then using it like this:
const PageFade = (props) => (
<CSSTransition
{...props}
classNames="fadeTranslate"
timeout={1000}
mountOnEnter={true}
unmountOnExit={true} />
)
But on mounting the app I'm getting an error when calling the component:
I've tried installing react-transition-group on both an existing project and a new one, and exactly the same thing happens.
Are you sure that all of props.children are not undefined? If you passed some undefined childern for the componet you'll get this error. Component must be string, class/function or null.

Nativescript looking for Nativescript-theme-core in the wrong place?

I am busy with a very simple barcode scanner app and getting a strange error after the app gets deployed to a genymotion emulator... It seems like it's looking for the core theme in the wrong place? Any idea why this is happening and how I can try fix it?
my error:
JS: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
JS: ns-renderer: File /data/data/org.nativescript.barcodescanner/files/app/nativescript-theme-core/css/core.dark.css does not exist. Resolved from: nativescript-theme-core/css/core.dark.css.
JS:
JS: Error: File /data/data/org.nativescript.barcodescanner/files/app/nativescript-theme-core/css/core.dark.css does not exist. Resolved from: nativescript-theme-core/css/core.dark.css.
JS: at FileSystemResourceLoader.get (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/resource-loader.js:22:19)
JS: at DirectiveNormalizer._fetch (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/#angular/compiler/bundles/compiler.umd.js:13661:45)
JS: at /data/data/org.nativescript.barcodescanner/files/app/tns_modules/#angular/compiler/bundles/compiler.umd.js:13761:55
JS: at Array.map (native)
JS: at DirectiveNormalizer._loadMissingExternalStylesheets (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/#angular/compiler/bundles/compiler.umd.js:13761:16)
JS: at /data/data/org.nativescript.barcodescanner/files/app/tns_modules/#angular/compiler/bundles/compiler.umd.js:13764:28
JS: at ZoneDelegate.invoke (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:190:28)
JS: at Zone.run (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:83:43)
JS: at /data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:449:57
JS: at ZoneDelegate.invokeTask (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:223:37)
my app.css:
#import 'nativescript-theme-core/css/core.dark.css';
and in my app.component.css:
styleUrls: ['./app.css']
In your app.css you should have
#import 'nativescript-theme-core/css/core.dark.css';
And in your app.component.ts remove the explicit call to app.css.
It is not needed as the styles in app.css will be visible globally in your application by default. See this comment for details.

Resources