I updated my nativescript from the 2.5.2 to the 3.0.3. And suddenly when I try to run the app I get the following errors:
node_modules/tns-core-modules/tns-core-modules.d.ts(17,27): error
TS2304: Cannot find name 'Headers'.
node_modules/tns-core-modules/tns-core-modules.d.ts(19,44): error
TS2304: Cannot find name 'RequestInit'.
node_modules/tns-core-modules/tns-core-modules.d.ts(19,66): error
TS2304: Cannot find name 'Response'.
I don't understand why, because I think I'm not using this modules in my project.
Thanks! :)
add to tsconfig
"lib": [
"es2017",
"dom"
]
Related
I found this project interesting at the NPM,
https://www.npmjs.com/package/react-native-progress-webview
however I followed the instruction, it shows the following error:
error: bundling failed: Error: Unable to resolve module `react-native-progess-webview` from `mycomponent.js`: Module `react-native-progess-webview` does not exist in the Haste module map
I already installed 'react-native-webview' and it works fine, however react-native-progess-webview seems not able to be imported.
I am just simply importing the library like this:
import ProgressWebView from "react-native-progess-webview";
How to solve?
I found that it is a typo in the tutorial, in the tutorial it is:
import ProgressWebView from "react-native-progess-webview";
but the correct one is:
import ProgressWebView from "react-native-progress-webview";
There is an "r" in the "progress".
I'm using angular-cli and implemented nanogallery in my project,
now i'm going to build my project:
if i run
ng build --prod
after uploading file to host it throws these errors in console:
jQuery.Deferred exception: i is not a function R/</</<#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:148258
each#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:22422
R/</<#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:145805
R/<#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:145721
R#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:145629
h#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:108785
l#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:108322
r/this.initiateGallery2#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:237166
t.nanogallery2/i.init#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:263620
t.nanogallery2#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:263679
jQuery.fn.nanogallery2/<#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:271921
each#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:22422
each#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:21097
jQuery.fn.nanogallery2#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:271900
M4vW/j</l.prototype.loadBranches/</<#http://ankiweb.ir/4.1155fed864443988871c.chunk.js:1:19424
u#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:48959
r/</h<#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:49257
ZSR1/</</</u</t.prototype.invokeTask#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:19495
onInvokeTask#http://ankiweb.ir/main.36efe7b363f6a9952e89.bundle.js:1:603433
ZSR1/</</</u</t.prototype.invokeTask#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:19408
ZSR1/</</</i</e.prototype.runTask#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:14671
ZSR1/</</</c</e.invokeTask#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:20589
e/this.invoke<#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:20474
u/n.args[0]#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:35813
undefined
ERROR TypeError: "i is not a function"
Rhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:148258eachhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:22422Rhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:145805Rhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:145721Rhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:145629hhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:108785lhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:108322initiateGallery2http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:237166inithttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:263620nanogallery2http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:263679nanogallery2http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:271921eachhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:22422eachhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:21097nanogallery2http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:271900loadBrancheshttp://ankiweb.ir/4.1155fed864443988871c.chunk.js:1:19424uhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:48959hhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:49257invokeTaskhttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:19495onInvokeTaskhttp://ankiweb.ir/main.36efe7b363f6a9952e89.bundle.js:1:603433invokeTaskhttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:19408runTaskhttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:14671invokeTaskhttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:20589invokehttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:204740http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:35813
jQuery.Deferred exception: l.branches[u].gallery is undefined M4vW/j</l.prototype.loadBranches/</<#http://ankiweb.ir/4.1155fed864443988871c.chunk.js:1:19176
u#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:48959
r/</h<#http://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:49257
ZSR1/</</</u</t.prototype.invokeTask#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:19495
onInvokeTask#http://ankiweb.ir/main.36efe7b363f6a9952e89.bundle.js:1:603433
ZSR1/</</</u</t.prototype.invokeTask#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:19408
ZSR1/</</</i</e.prototype.runTask#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:14671
ZSR1/</</</c</e.invokeTask#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:20589
e/this.invoke<#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:20474
u/n.args[0]#http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:35813
undefined
ERROR TypeError: "l.branches[u].gallery is undefined"
loadBrancheshttp://ankiweb.ir/4.1155fed864443988871c.chunk.js:1:19176uhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:48959hhttp://ankiweb.ir/scripts.0334935c44e8c4e6422d.bundle.js:1:49257invokeTaskhttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:19495onInvokeTaskhttp://ankiweb.ir/main.36efe7b363f6a9952e89.bundle.js:1:603433invokeTaskhttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:19408runTaskhttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:14671invokeTaskhttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:20589invokehttp://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:204740http://ankiweb.ir/polyfills.d248127361c9f04ac793.bundle.js:1:35813
every thing work's correctly except "gallery"
but if i run
ng build
every thing is ok include "Gallery"
any body know what's the problem!?
thank you!
I resolved this production issue by referencing the none minified versions of jquery and nanogallery in angular.json
so change this...
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/nanogallery2/dist/jquery.nanogallery2.min.js"
]
to this...
"scripts": [
"node_modules/jquery/dist/jquery.js",
"node_modules/nanogallery2/dist/jquery.nanogallery2.js"
]
I don't understand why but the minification and bundling of the already minified nanogallery jquery plugin was causing this issue.
I am trying to build a new front end application with dotnet core but getting an error as below while to open the project.
i followed that answer but not working for me.
getting this error while trying to restore :
error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
running dotnet restore command gives below error :
error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.1\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
I got the same problem yesterday.
Unfortunately, I don't know exactly what I was doing wrong, but I managed to solve my error.
I used the strategy on this page here
I added a global.json file in my Solution Items and I specified all the .xproj projects of my solution.
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003121"
}
Hope it helps.
Running dotnet-restore solved this issue for me. This was after i had updated the global.js to tarket the specific SDK version.
https://learn.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-restore
After adding a new dependency, I get the error message "Unable to resolve module path" in a red screen in my React Native app. I've tried clearing the cache as the screen instructs.
(question is brief as I'm answering it myself)
The error message:
Unable to resolve module path
Should really be:
Unable to resolve module "path"
path is the name of the module it can't load! I was reading the error message as "can't resolve a path to the module".
So the root cause is, the file it lists in the error message is importing the native Node module path, which isn't available on React Native.
The solution is to npm install -D path, which is a replica implementation.
Any imports from #babel/core package is causing this error.
Some code editors are inserting the import line automatically.
For example, import { types } from '#babel/core' is inserted by Visual Studio Code when you enter types.
If you remove the imports from #babel/core in the codes, it will be fixed.
Quote from chronikum on react-native github issues for future readers
Just check if you somewhere accidentally imported something from
#babel/core.
Here is the original link
https://github.com/facebook/react-native/issues/27522#issuecomment-568306279
None of the answers are really helpful, I found that the problem in my case was that the macros plugin was missing in my babel configuration file.
This is what I had in my babel.config.js
module.exports = {
presets: ["module:metro-react-native-babel-preset"],
};
After adding the macros plugin
module.exports = {
plugins: ["macros"],
presets: ["module:metro-react-native-babel-preset"],
};
If you get this error, most like you are missing a plugin in your babel config.
I have solved my issue by the below steps.
Read the error message carefully, the error is node modules path(mentioned as NO: 1 in below image). In my case, I have the "just-cli/" module (Mentioned NO: 2).
search the module (just-cli) you have imported somewhere in your project and just Remove it. The problem will be solved.
I have planned to use the Ext.ux.panel.PDF extension https://github.com/SunboX/ext_ux_pdf_panel for my app but cannot make it to work inside my Sencha Architect 3.0.
I have downloaded the files and put the js file in my project directory /ext/src/ux/panel/PDF.js. In the apllication I have put the require line on the top level under Application
Ext.application({
requires: [
'Ext.window.MessageBox',
'Ext.ux.panel.PDF'
], ...
But when I want to instantiate the pdf panel with the code from the example I keep getting this error:
Uncaught Error: The following classes are not declared even if their files have been loaded: 'Ext.ux.panel.PDF'. Please check the source code of their corresponding files for possible typos: 'ext/src/ux/panel/PDF.js
Please advise.
EDIT: I have tried using a loader but the error is still present
Ext.Loader.setConfig({
enabled: true,
paths: {
Ext: 'ext/src'
}
});
The error you get means, that the file ext/src/ux/panel/PDF.js does not contain valid javascript. I tested this extension, and I don't get that error.
It the file is empty, you will get this error only, if it contains invalid javascript, this should be the second error, while the first will complain about the syntax error.
If the file is missing, you'll get another error.
Have a close look at the file, maybe it got corrupted while downloading or unzipping the extension. Or you edited it by error and introduced an error.
try to add below code on top of your Ext.application({ ~~~ source
Ext.Loader.setPath({
'Ext.ux' : 'YOURPATH(ABSOLUTE OR RELATIVE)/ext/src/ux'
});