NativeScript Permissions - Cannot find name 'android'? - nativescript

I'm using the Spartadigital NativeScript Permissions plugin
I've also did :
tns plugin add #spartadigital/nativescript-permissions
And inside the ts file :
import {Permissions} from '#spartadigital/nativescript-permissions';
However when I run tns run android : I get :
node_modules/#spartadigital/nativescript-permissions/permissions.android.d.ts(2,37):
error TS2304: Cannot find name 'android'.
node_modules/#spartadigital/nativescript-permissions/permissions.android.d.ts(3,34):
error TS2304: Cannot find name 'android'.
node_modules/#spartadigital/nativescript-permissions/permissions.ios.d.ts(24,47):
error TS2552: Cannot find name 'NSObject'. Did you mean 'Object'?
node_modules/#spartadigital/nativescript-permissions/permissions.ios.d.ts(24,67):
error TS2304: Cannot find name 'CLLocationManagerDelegate'.
node_modules/#spartadigital/nativescript-permissions/permissions.ios.d.ts(26,20):
error TS2304: Cannot find name 'CLLocationManagerDelegate'.
Looking at the file , I see that it doesn't know android :
Nor other IOS objects :
I already have tns-platform-declarations :
Question:
Why doesn't it recognize those keywords and how can I fix it ?
package.json
ts.config

You should add the tns-platform-declarations module to your project, this will give you the typings for the native namespaces, classes, etc and enable intellisense also for what is provided by this module.
https://www.npmjs.com/package/tns-platform-declarations

an easy answer would be to add declare var android to the top of the typescript file (under imports) you are calling it in. NativeScript knows where to get android from once its compiled.

Related

Is it possible to change the cypress.config.ts/cypress.config.js location instead of have it on the root of the project?

Is a way to change thecypress.config.ts file's location instead of having it in the root of the project along with the package.json, tsconfig.json?
I changed the file (cypress.config.ts) location but it doesn't work I got an error message :
Could not find a Cypress configuration file in this folder:
/Users/Mycomputer/cypressDemoPomExample
I figure out how to fix it
You can simply run the command :
npx cypress open --config-file theNewCypressConfigPath

ModuleNotFoundError: No module named 'ingredients'

Following the Graphene-Django basic tutorial verbatim results in this helpful situation.
Maybe there is a dir problem or something? As soon as we add the installed app, it is not found?
Tried everything here
Try to open "cookbook/ingredients/" folder and change name in IngredientsConfig to cookbook.ingredients:
class IngredientsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'cookbook.ingredients'

Error when importing a 6.2 theme from its plugin sdk to themegenerator

I created a new folder test and navigated to the folder via command prompt.Ran Command yo liferay-theme:import.Then I get a question "What theme would you like to import".I give the path of theme in 6.2 plugins sdk.I get error meassage theme doesnot exist when clearly it exists in the path i give

Namespace 'React' has no exported member 'InputHTMLAttributes' and Interface 'MenuItemProps' incorrectly extends interface 'ListItemProps'

I'm using Material-UI with typescript, I've installed the typescript types with
npm install -D #types/material-ui.
When my webpage loads now I get the following errors:
ERROR in [at-loader]
./node_modules/#types/material-ui/index.d.ts:1235:26
TS2430: Interface 'MenuItemProps' incorrectly extends interface 'ListItemProps'. Types of property 'label' are incompatible.
Type 'ReactNode' is not assignable to type 'string | undefined'.
Type 'null' is not assignable to type 'string | undefined'.
ERROR in [at-loader]
./node_modules/#types/material-ui/index.d.ts:1491:69
TS2694: Namespace 'React' has no exported member 'InputHTMLAttributes'.
There are absolutely no other changes to my project besides the addition of material-ui to node_modules which isn't even imported, the issue is likely coming from its types import.
So I came up with a very hacky solution where I added "noImplicityAny":false to my tsconfig.json. This does not actually fix the issue though and I would appreciate a proper fix.
I think you need upgrade to the latest version of #types/react.
I had the same issue and I found it's caused by the global.d.ts file missing in the node_modules/#types/react folder.
After manually running
npm install #types/react --save
it's fixed.

hybris error installing secureportal addon

I am trying to install the "secureportaladdon". While installing it using the command:
ant addoninstall -Daddonnames="secureportaladdon" -DaddonStorefront.yb2bacceleratorstorefront="yb2bacceleratorstorefront"
I am getting the error
BUILD FAILED C:\work\trail\hybris\bin\ext-addon\addonsupport\resources\addonsupport\ant\acc-ant-addons.xml:592: The following error o ccurred while executing this line: C:\work\trail\hybris\bin\ext-addon\addonsupport\resources\addonsupport\ant\acc-ant-addons.xml:508: The following error o ccurred while executing this line: C:\work\trail\hybris\bin\ext-addon\addonsupport\resources\addonsupport\ant\acc-ant-addons.xml:354: Storefront template p arameters are missing. Set at least one storefront parameter (addonStorefront...) in command line : ant addoninstall -Da ddonnames="AddOnName1,AddOnName2" -DaddonStorefront.yacceleratorstorefront="B2CStorefront1,B2CStorefront2" -DaddonStoref ront.yb2bacceleratorstorefront="B2BStorefront1,B2BStorefront2"
Am i missing any template property to be set in the accelerator? Please help.
first of all, did you include < extension name="secureportaladdon" /> in the localextensions.xml file?
If so, instead of the ant command to install the addon you can alternatively add the "secureportaladdon" to < requires-extension > in the extensioninfo.xml file of your storefront.
Now, is "yb2bacceleratorstorefront" the storefront you want to add it to?
You can go to the administration console and check in platform/extensions, see if that extension you want is included and if its the one you want to use. If you have used the accelerator to generate your own storefront you would need to install it in yourgeneratedshopstorefront.

Resources