Error: Problem validating fields in app.json. See https://docs.expo.io/workflow/configuration/ • should NOT have additional property 'nodeModulesPath - javascript

Trying to use expo publish in order to host my react native app and show other people but running into this error. It seems to indicate the need for the removal of a 'nodeModedulesPath' property from my app.json but ...well here is the structure. I'm not quite sure what needs to be removed or why, any help would be greatly appreciated.
{
"expo": {
"name": "new",
"slug": "new",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#9CB2A5"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#9CB2A5"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
[
"expo-notifications",
{
"icon": "./assets/icon.png",
"color": "#ffffff",
"sounds": [
"./local/assets/notification-sound.wav",
"./local/assets/notification-sound-other.wav"
]
}
]
],
"extra": {
"eas": {
"projectId": "027e8e01-7c7e-4212-8812-a49f5db4f826"
}
}
}
}
I tried finding the nodeModulesPath, there is no string with those characters in the entire project directory, and the configuration workflow shown in expo's documentation doesn't exactly explain what would cause this error.

Related

Allow third party cookie in incognito mode from expo-web project

I have a website on expo-web, in incognito mode my website is not able to send cookie.
So I found the solution here Chrome Extension in incognito mode
Expo uses app.json for generating manifest.json. Is there any way I can add incognito option in the expo app.json?
Here is my current app.json file
{
"expo": {
"name": "website name",
"slug": "website-name",
"privacy": "public",
"incognito": "split", // I want to add this property
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"packagerOpts": {
"sourceExts": [
"tsx",
"js",
"json",
"ts",
"jsx"
],
"config": "metro.config.js"
}
}
}

How to integrate cypress slack notifications using reportportal results?

I tried to integrate cypress and slack. I'm able to get simple notifications such as pipeline status, alert, push or merge request. My requirement is to get notification like this.
Also I'm not able to integrate reportportal, I need to get more detailed for slack notification.
I tried to follow these instructions
My cypress.json file look like this.
"reporterOptions": {
"configFile": "reporterOpts.json",
"reporterEnabled": "spec, mocha-junit-reporter, #reportportal/agent-js-cypress, mochawesome",
"reportportalAgentJsCypressReporterOptions": {
"endpoint": "https://reportportal.mlsdevcloud.com/api/v1/",
"token": "445151-w6djb-ae48-awd86wd",
"launch": "no launch",
"project": "demo",
"description": "UAT",
"autoMerge": true
},
"mochaJunitReporterReporterOptions": {
"mochaFile": "cypress/results/results-[hash].xml"
}
},
"reports": [
{
"targets": [
{
"name": "slack",
"inputs": {
"url": "https://hooks.slack.com/services/T/secreatToken/"
}
}
],
"results": [
{
"type": "junit",
"files": ["cypress/results/results-[hash].xml"]
}
]
}
]
And this is suggested json file.
{
"reports": [
{
"targets": [
{
"name": "teams",
"inputs": {
"url": "<teams-incoming-webhook-url>"
},
"extensions": [
{
"name": "report-portal-analysis",
"inputs": {
"url": "<report-portal-base-url>",
"api_key": "<api-key>",
"project": "<project-id>",
"launch_id": "<launch-id>"
}
}
]
}
],
"results": [
{
"type": "testng",
"files": ["path/to/testng-results.xml"]
}
]
}
]
}
how to pass
"launch_id": ""
it is generated every time when build is triggered.

How to implement Google AdMob service in React Native?

While working with testing ads, it was fine, but with real ad units, it didn't show up, and most importantly how to implement For the module to attribute interactions with ads to your AdMob app properly you will need to add a googleMobileAdsAppId property to app.json under [platform].config."
enter image description here
change googleMoblieAppId to your own app id. The one you get from admob.
{
"expo": {
"name": "YourappName",
"slug": "Slugname",
"privacy": "public",
"android": {
"package": "in.learner.yourappname",
"versionCode": 1,
"config": {
"googleMobileAdsAppId": "yourGoogleAppId goes here"
}
},
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"config": {
"googleMobileAdsAppId": "your GoogleAppId goes here"
}
}
}
}

Replace React Native Expo Splash Screen Image with Real Splash Screen

How to Replace React-Native Splash Image With Some Custom React-Native Page. Currently I'm using an image as splash screen. I want the splash screen to be dynamic and load/display some data from server. Here is my configuration of app.json:
{
"expo": {
"name": "SplashDemo",
"slug": "SplashDemo",
"privacy": "public",
"sdkVersion": "31.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.sample.splash",
"versionCode": 1
}
}
}
Primary focus on the splash configurations given as:
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
}
Can we somehow replace it with the React-Native page? How?

visual studio code clean task

I'm working in Visual Studio Code in Ubuntu on my Typescript project. And I'm wondering is there any possibility to execute some kind of 'clean' task.
Here's my tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"tasks": [
{
"taskName": "tsc",
"command": "tsc",
"isShellCommand": true,
"isBackground": true,
"problemMatcher": "$tsc"
},
{
"taskName": "clean",
"linux": {
"command": "rm",
"args": [
"./src/*.js"
],
"isShellCommand": true
},
"isShellCommand": true,
"isBackground": true
}
]
}
And here's my project structure.
Executing task clean says there's no such files or directory, while executing 'pwd' instead of rm says that I'm in the root of my project.
Any suggestions how does this build system work? Maybe there's some special syntax for env variables in VS Code?
After VSCode 1.14, we have a new tasks manager in VSCode. I'm using .NET Core on ubuntu and I have a build and a clean tasks like this:
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "process",
"command": "dotnet",
"args": [
"build",
"MyProj.csproj"
],
"options": {
"cwd": "${workspaceFolder}/src/MyProj/"
},
"problemMatcher": "$msCompile"
},
{
"label": "clean",
"type": "shell",
"linux": {
"command": "rm",
"args": [
"-rfv",
"bin/*",
"obj/*"
]
},
"windows": {
"command": "del",
"args": [
"/S /Q",
"bin/*",
"obj/*"
]
},
"options": {
"cwd": "${workspaceFolder}/src/MyProj/"
},
"problemMatcher": []
}
]
}
Both tasks works as expected.
I have also been looking for this, but as far as I understand, it's not possible to have more than one task in tasks.json. You can have a tasks array, but that only contains different command line parameters for the same task. This example has the 'echo' task, and you can call it with different parameters. If you call the task 'hello' then 'echo Hello World' will be executed:
{
"version": "0.1.0",
"command": "echo",
"isShellCommand": true,
"args": [],
"showOutput": "always",
"echoCommand": true,
"suppressTaskName": true,
"tasks": [
{
"taskName": "hello",
"args": ["Hello World"]
},
{
"taskName": "bye",
"args": ["Good Bye"]
}
]
}
Have you tried using workspace variables? ${workspaceRoot} might be particular useful for you.

Categories

Resources