tsconfig.app.json not found when deploying to App Engine - ios

I'm trying to deploy an Angular-cli 6 Universal app to App Engine for the first time. I'm getting the error:
ENOENT: no such file or directory, stat '/app/src/tsconfig.app.json'
I don't have any issues building or testing the app. What determines the path? I've looked at the migration guide that describes changes from angular-cli.json to angular.json, but I can't find the solution.
tsconfig.json (root project folder)
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/#types"
],
"lib": [
"es2017",
"dom"
]
}
}
tsconfig.app.json (in /src under the root)
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"typeRoots": [
"node_modules/#types"
],
"types": [
"jasmine", "node"
],
"lib": [
"es2017",
"dom"
]
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
angular.json has this reference
"tsConfig": "src/tsconfig.spec.json"

I found the solution. I was excluding some files in app.yaml that I should not have excluded.

Related

AWS CDK Not Finding Custom .d.ts files in project on Synth

I have a TypeScript CDK Project. Per the recommendation I read somewhere, I've put both my infrastructure and runtime code into the same project.
The runtime code is required to use an obscure js library which does not have any type definitions. I've created a custom .d.ts file with types as described here. The TypeScript compiler is happy with this and tsc builds correctly.
When however I run cdk synth I get the "Could not find a declaration file for module 'xyz'" error. I'm guessing that the CDK can't find the definition file, however it's in the same location as other .ts files.
I've edited cdk.json and removed "**/*.d.ts" from the exclude filter to no effect.
tsconfig.json:
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"lib": [
"es2020"
],
"declaration": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": [
"./types",
"./node_modules/#types"
],
"outDir": "./out",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"sourceMap": true,
},
"include":[
"lib",
"bin",
"lib/**/*",
"bin/**/*",
"types"
],
"exclude": [
"node_modules",
"cdk.out",
"./out/**/*",
"test/**/*.spec.ts"
]
}
cdk.json:
{
"app": "npx ts-node --prefer-ts-exts bin/LeopardGeotabApp.ts",
"watch": {
"include": [
"**",
"lib/geotab/mg-api.js.d.ts"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"build": "",
"versionReporting": true,
"context": {
"#aws-cdk/aws-lambda:recognizeLayerVersion": true,
"#aws-cdk/core:checkSecretUsage": true,
"#aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
],
"#aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"#aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"#aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
"#aws-cdk/aws-iam:minimizePolicies": true,
"#aws-cdk/core:validateSnapshotRemovalPolicy": true,
"#aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true,
"#aws-cdk/aws-s3:createDefaultLoggingPolicy": true,
"#aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true,
"#aws-cdk/aws-apigateway:disableCloudWatchRole": true,
"#aws-cdk/core:enablePartitionLiterals": true,
"#aws-cdk/aws-events:eventsTargetQueueSameAccount": true,
"#aws-cdk/aws-iam:standardizedServicePrincipals": true,
"#aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true
}
}
I'm just executing cdk synth with no parameters.
I got around this by modifying cdk.json
{
"app": "cp ./types/mg-api-js.d.ts ./node_modules/#types/ && npx ts-node --prefer-ts-exts bin/LeopardGeotabApp.ts && rm ./node_modules/#types/mg-api-js.d.ts",
....
}
If I didn't delete the file after the ts-node step, then if I ran tsc on its own it would fail because of the duplication of the module in the .d.ts file.

How to disable electron generate zip.blockmap?

I am using electron-builder to build mac and windows app. Abouve is my electron build output directory. I don't need autoupdater. So I just wanna .dmg and .exe files. How can I set builder config to diable electron generate those useless files(yal、yaml、zip、zip.blockmap)?
Below is my package.json
"build": {
"appId": "we-media-helper",
"copyright": "Copyright © 2022 Eve-Sama",
"generateUpdatesFilesForAllChannels": true,
"directories": {
"output": "./dist/installer"
},
"mac": {
"target": {
"target": "default",
"arch": [
"arm64",
"x64",
"universal"
]
},
"icon": "./assets/icons/mac-dock.icns",
"publish": {
"owner": "Eve-Sama",
"repo": "we-media-helper",
"provider": "github"
}
},
"dmg": {
"writeUpdateInfo": false
},
"nsis": {
"differentialPackage": false,
"oneClick": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"installerIcon": "./assets/icons/win-taskbar.ico",
"uninstallerIcon": "./assets/icons/win-taskbar.ico",
"installerHeaderIcon": "./assets/icons/win-taskbar.ico",
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"artifactName": "${productName}_Setup_${version}.${ext}"
},
"win": {
"icon": "./assets/icons/win-taskbar.ico",
"target": [
{
"target": "nsis",
"arch": [
"ia32"
]
}
]
},
"files": [
"**/*",
"!dist/installer",
"!**/*.ts",
"!**/*.tsx",
"!src/",
"!public/",
"!.eslintignore",
"!.eslintrc.js",
"!.gitignore",
"!.prettierrc",
"!gulpfile.ts",
"!LICENSE",
"!package-lock.json",
"!README.md",
"!tsconfig.json",
"!yarn.lock"
],
"extends": null
},
And I have another question. As you can see, I set mac.target.arch as ['arm64', 'x64', 'universal']. And output directory contains folder mac rather than mac-x64. why? How can I set it as mac-x64

Electron build error: file not found in artifact

this is my first time building an electron app and I am getting confused about this error I got in my production package.
I've created my app using the electron-react-boilerplate, and I am running the package build with the default config.
"build": {
"productName": "App",
"appId": "org.erb.ElectronReact",
"asar": true,
"asarUnpack": "**\\*.{node,dll}",
"files": [
"dist",
"node_modules",
"package.json"
],
"afterSign": ".erb/scripts/notarize.js",
"mac": {
"target": {
"target": "default",
"arch": [
"arm64",
"x64"
]
},
"type": "distribution",
"hardenedRuntime": true,
"entitlements": "assets/entitlements.mac.plist",
"entitlementsInherit": "assets/entitlements.mac.plist",
"gatekeeperAssess": false
},
"dmg": {
"contents": [
{
"x": 130,
"y": 220
},
{
"x": 410,
"y": 220,
"type": "link",
"path": "/Applications"
}
]
},
"win": {
"target": [
"nsis"
]
},
"linux": {
"target": [
"AppImage"
],
"category": "Development"
},
"directories": {
"app": "release/app",
"buildResources": "assets",
"output": "release/build"
},
"extraResources": [
"./assets/**"
]
},
My preload.js file is requiring a module (module.umd.js) that is reading from three .trie files, so my folder structure looks like this:
Once builded, the app is not working and I see this error on the web console inspector:
Error: ENOENT, dist\main\data.trie not found in C:\Users\ivan\Desktop\app-electron\release\build\win-unpacked\resources\app.asar
So my question is: Do I have to somehow add those .trie files in app.asar in order to solve this problem?

How can I set the filename of the created .deb file when building my Electron.NET application for Linux?

This is my electron.manifest.json
{
"executable": "MyApplication.UI",
"splashscreen": {
"imageFile": "/wwwroot/assets/Animation.svg"
},
"author": "MyCompany",
"environment": "Production",
"singleInstance": false,
"build": {
"appId": "com.mycompany.myapplication",
"productName": "MyApplication",
"copyright": "Copyright # 2022",
"buildVersion": "2022.1.0",
"compression": "maximum",
"fileAssociations": [
{
"ext": "sdg",
"name": "MyApplication File",
"role": "Editor"
}
],
"publish": {
"provider": "generic",
"url": "https://mydomain.io/Installer/MyApplication/",
"channel": "latest"
},
"nsis": {
"allowToChangeInstallationDirectory": true,
"oneClick": false,
"perMachine": true,
"installerIcon": "bin/Assets/icon.ico",
"uninstallerIcon": "bin/Assets/icon.ico",
"installerHeaderIcon": "bin/Assets/icon.ico",
"menuCategory": true
},
"win": {
"target": [
"nsis"
],
"icon": "Assets/icon.ico"
},
"linux": {
"target": "deb",
"maintainer": "MyCompany",
"vendor": "MyCompany",
"synopsis": "MyApplication",
"executableName": "MyApplication",
"description": "Doing some magic.",
"category": "Development",
"icon": "./../../Assets/Icons/32x32.png"
},
"directories": {
"output": "../../../bin/Installer",
"buildResources": "Assets"
},
"extraResources": [
{
"from": "./bin",
"to": "bin",
"filter": [
"**/*"
]
}
],
"files": [
{
"from": "./ElectronHostHook/node_modules",
"to": "ElectronHostHook/node_modules",
"filter": [
"**/*"
]
},
"**/*"
]
}
}
The created .deb file when building for linux is called electron-net_{version}.deb. That wouldn't be a problem but when executed, the application name electron-net is shown.
How can I change that? I checked the documentation (here https://www.electron.build/configuration/linux) already but I dont see any more options in my config?
I am using ElectronNET.CLI Version 15.5.1 on Ubuntu 20.04.4, .NET Version 5.0.406
I think you're looking for the artifactName property under build for your file name and the name property under at root for the name that is displayed
{
"name" : "MyApplication",
"executable" : "MyApplication",
"build": {
"artifactName": "my-application.${ext}",
}
}

How to Electron builder MSI install/register windows service

I want to install my windows service with my electron builder MSI
Using NSIS I am able to include "build/installer.nsh" using installer.nsh I am able to call windows service EXE after NSIS EXE install.... but there is no option in MSI to include "build/installer.nsh" so is there a way to call other EXE/MSI from electron builder MSI or other way to install windows service exe from electron builder MSI
Package FIle
"win": {
"target": [
"nsis",
"msi"
],
"certificateFile": "C:\\SVN\\mancrossplatform\\trunk\\mcs.pfx",
"certificatePassword": "",
"publisherName": "",
"requestedExecutionLevel": "asInvoker",
"signAndEditExecutable": true,
"signDlls": true
},
"nsis": {
"oneClick": true,
"perMachine": false,
"deleteAppDataOnUninstall": true,
"createDesktopShortcut": true,
"include": "build/installer.nsh"
},
"extraFiles": [
"software"
],
"msi": {
"oneClick": true,
"perMachine": true,
"createDesktopShortcut": true
},
"files": [
"resources",
"dist/",
"dist/main.prod.js",
"dist/main.prod.js.map",
"package.json"
],
"directories": {
"buildResources": "resources",
"output": "release"
}

Resources