I'm trying to run a typescript project (I'm using vs2012) and to import angular 2.
the projects is set to AMD module system and ECMAcript 5
In ts filed I'm importing the module:
import ng2 = require('angular2/angular2');
=> in js file it replaced to:
define(["require", "exports"], function (require, exports) {
And I'm getting this require.js runtime error:
Mismatched anonymous define() module: function (require, exports) {
....
// code
....
}
Is anyone knows what the cause of it?
Thanks a lot!
Lior
Try using the new ES6 syntax for importing files.
Example: import {bootstrap} from 'angular2/angular2';
This Angular2 Visual Studio tutorial can help you setup your project.
Related
Can someone help me? I used manual for section: webpacker
and active_admin style overrides style for rest application.
I read this link and did these suggestions, but when I moved app/javascript/stylesheets/active_admin.scss to vendor/assets/stylesheets/active_admin.scss I caught error:
Uncaught Error: Cannot find module '../stylesheets/active_admin'
webpackMissingModule active_admin.js:1
js active_admin.js:1
Webpack 5 active_admin.js:1
When I added path to config/webpacker.yml
resolved_paths:
['vendor','vendor/assets','vendor/assets/stylesheets' ]
it wasn't help me and I was catching the same error.
content of active_admin.js:
import "../stylesheets/active_admin";
import "#activeadmin/activeadmin";
i want to create custom web component, so i can reuse this component to another project, it's work locally when i run yarn serve
and then i publish it to npm, but when i import it to another vue project i got this error
Github Page : https://github.com/point-red/vue-point-table
vue.js:634 [Vue warn]: Error in mounted hook: "TypeError: Cannot read property 'offsetHeight' of null"
found in
---> <PointTable>
<App>
<Root>
anyone can help ? i don't know where is the mistake
IntelliJ IDEA started highlighting errors in some of my import statements that worked previously. This is not unexpected as net.corda.finance is still in the "incubating" stage.
I am working in Java.
Corda Release: 3.3
Noticed this change on github: https://github.com/corda/corda/pull/4700
So I made what I thought are the necessary changes...
//Old
//import static net.corda.finance.utils.StateSumming.sumCashBy;
//New
import static net.corda.finance.contracts.utils.StateSumming.sumCashBy;
...but I'm still getting an error. I am sure I must be overlooking something simple.
#Kid101 put me on the right track by trying StateSumming.sumCashBy(contractState)
Once I did that IntelliJ recognized I needed to add:
net.corda:corda-finance:3.3-corda
...to the classpath. If I allowed IntelliJ to add it from the context menu the error reappeared every time gradle refreshed. So I added:
cordaCompile "$corda_release_group:corda-finance:$corda_release_version"
...to the build.gradle file under the dependencies section. No more errors with my import statement:
import net.corda.finance.utils.StateSumming;
...and no issues calling the sumCashBy method.
The change you mention is in Corda master branch, In CashTests.kt you can see how sumCashBy is imported, import net.corda.finance.contracts.utils.sumCashBy.
In corda/release-V4-branchpoint import is still net.corda.finance.utils.sumCashBy i.e. the change has not made in yet to V4.
Try to build the project again.
If using Java, try: StateSumming.sumCashBy(contractState)
You should import a dependency package.
You add below to build.gradle and refresh your IntelliJ project.
dependencies {
....
cordaCompile "$corda_core_release_group:corda-finance-contracts:$corda_core_release_version"
...
I'm using ASP.NET Core Template Pack (Angular 2 , Net core ,webpack) (plugin website)
Now I need to use a css file that is not located in mycomponents folder.
My folder structure :
screenshot
Component
import { Component } from '#angular/core';
#Component({
selector: 'app',
template: require('./app.component.html'),
styles: [require('./mystyle.css')]
})
export class AppComponent {
}
and I ran the command :
webpack --config webpack.config.vendor.js
I still get the error
Call to Node module failed with error: Prerendering failed because of error: Error: Cannot find module "./mystyle.css"
Can someone help me ?
Thanks
Your css file is located in different folder.
Path to your custom css should be [require('../../../assets/css/mystyle.css')]
Please note it that there is already created css file for app.component by default.
i am using QtAV but getting this error so please help me:
QQmlApplicationEngine failed to load component
qrc:/main.qml:4 plugin cannot be loaded for module "QtAV": Cannot load library /home/intel/Qt5.7.0/5.7/gcc_64/qml/QtAV/libQmlAV.so: (libswresample.so.2: cannot open shared object file: No such file or directory)
at qrc:/main.qml:4 import QtAV1.6
using linux
The application cannot find your requested plugin.
You need to check if your import path is set correctly. If this is the case: please check if the plugin is installed correctly. You can use
export QML_IMPORT_TRACE=1
to check which import pathes are set.
And make sure, that all dependncies are installed as well. For instance libswresample ( see https://ffmpeg.org/libswresample.html )