jHipster error after change to prod profile - libraries

I've been developing my app in 'dev' profile, and everything was working fine. Then I've tried to change to 'prod' so I can deploy it to Heroku. I've run ./mvnw -Pprod
Now I'm getting this error:
All libraries are crashed..
Here is my Project tree:
And in index.html I included all libraries like this:
<script src="bower_components/chart.js/dist/Chart.js"></script>

Related

grpc fails to load in electron - could not locate proto files

OK I've got an electron app (5.0.6) which relies on GRPC node lib.
Dev build works fine.
Prod build, however, fails. I can run a successful prod build and create a windows installer, mac dmg etc. But when I start the app, only a blank screen appears. And I get this error:
Uncaught Error: ENOENT: no such file or directory, open 'google/protobuf/api.proto'
This file exists in node_modules, it's used by one of the dependencies (protobufs.js).
The same code runs fine with dev builds. But it always fails in production (on all platforms)
How can I solve this? Is this caused by the asar archive the prod build creates?
Thanks in advance

"CFBundleIdentifier Does Not Exist" when building Staging scheme in React Native

I am trying to get a react-native iOS setup working that includes a Staging scheme/configuration.
So far I managed to get all three schemes working inside of Xcode and I am able to install them alongside each other in one simulator as well.
However, for some reason, when I try to run
react-native run-ios --scheme "staging" --configuration "Staging"
in the CLI, the build succeeds but I get the error:
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Now, I noticed that in the build folder, I always end up with a partial Staging product and a partial Release product when building the Staging scheme.
Below, you will find screenshots of my build folder after running the build command for with Staging configuration/scheme.
As you can see, the app itself (including the Info.plist) is located not under Staging-iphonesimulator but Release-iphonesimulator.
I am not sure if this desired behaviour or not, or if I just need to point the Staging scheme to the correct folder in my Search paths?
Any help would be enormously appreciated!
I already tried:
Cleaning cache/build folders
Updating dependencies

Angular PWA Regenerate Manifest

According the the Angular docs here https://angular.io/guide/service-worker-config I can run this command
ngsw-config dist src/ngsw-config.json /base/href
And the CLI should regenerate my service worker manifest.
However it doesn't work I just get the following error message
zsh: command not found: ngsw-config
I have looked on npm, tried npm run ngsw-config, ng ngsw-config seems to me it doesn't exist. I am using angular 7.2
Maybe there is a new way to do this and the docs are out of date? If so what is the new way to do this ?
It doesn't work. You can edit the files and then you can use the command: ng build --prod
Now the ngsw-worker.js is in the dist folder

Correct deployment script for Azure Git backed continuous Deployment

I have a ASP.Net 4.5 MVC application which uses Angular 1.5. The JS code is Typescript and a post build action builds the js code and deploys it to the folder where my application refers to.
I have a Slot on my azure web app which is backed my gitlab repo. Committing to the repo, triggers the deployment, however the post deployment build frequently seems to have issues when a bower/npm or typings library is updated (which is resolved by manually clearing the folder via the kudu console). Does someone have an example of a deploy.cmd script which does the equivalent of
npm install
typings install
at the correct point in the pipeline so that the files get deployed correctly.
I want to start scratch with a new slot, and to get the existing slot to work in the past i had to manually install typings for example "npm install typings --global" in order to get the build to work without a typings error.
Update Output Below
I'm guessing that the errors below are due to azure running typescript 1.6 compiler over reference files which need typescript > 1.6.
My csproj has <TypeScriptToolsVersion>2.0</TypeScriptToolsVersion>
(ive removed my files from the compile output, but the _all.d.ts file does reference the errored files below
CompileTypeScript:
D:\Program Files (x86)\Microsoft SDKs\TypeScript\1.6\tsc.exe --sourcemap --target ES5 --noEmitOnError "REMOVED MY TYPESCRIPTFILES" "D:\home\site\repository\mymvcproject\app\src\_all.d.ts"
D:\home\site\repository\mymvcproject\typings\globals\angular\index.d.ts(1824,32): error TS1110: Build: Type expected. [D:\home\site\repository\mymvcproject\mymvcproject.csproj]
D:\home\site\repository\mymvcproject\typings\globals\angular\index.d.ts(1824,50): error TS1005: Build: ']' expected. [D:\home\site\repository\mymvcproject\mymvcproject.csproj]
D:\home\site\repository\mymvcproject\typings\globals\angular\index.d.ts(1824,58): error TS1005: Build: ',' expected. [D:\home\site\repository\mymvcproject\mymvcproject.csproj]
D:\home\site\repository\mymvcproject\typings\globals\angular\index.d.ts(1824,59): error TS1136: Build: Property assignment expected. [D:\home\site\repository\mymvcproject\mymvcproject.csproj]
D:\home\site\repository\mymvcproject\typings\globals\angular\index.d.ts(1941,1): error TS1128: Build: Declaration or statement expected. [D:\home\site\repository\mymvcproject\mymvcproject.csproj]
Done Building Project "D:\home\site\repository\mymvcproject\mymvcproject.csproj" (Build;pipelinePreDeployCopyAllFilesToOneFolder target(s)) -- FAILED.
FINAL UPDATE
After the typescript team finally generated a version of typescript 2.* which could be installed on Azure, and then the Kudu team deployed it. Now the whole process works! the note from below about using
"preinstall": "npm install typescript -g && npm install typings -g"
Was the other part of the solution!
According to your requirement, you could follow the steps below to achieve your purpose.
Create a deployment script
You could log in to KUDU tool (https://.scm.azurewebsites.net/), click "Tool" > "Download deployment script". Also, you could leverage azure-cli to generate the script. For more details about how to generate deployment script via azure-cli, you could refer to this tutorial.
Customize the deployment script
For using NPM to manage your packages, you could add the following scripts in your package.json file.
"scripts":{
"preinstall": "npm install typescript -g && npm install typings -g"
}
Then, you need to add the following scripts to the deploy.cmd file.
IF EXIST "%DEPLOYMENT_SOURCE%\package.json" (
pushd "%DEPLOYMENT_SOURCE%"
echo installing npm package
call :ExecuteCmd npm install --production
IF !ERRORLEVEL! NEQ 0 goto error
popd
)
Or you could add the following scripts to install typescript and typings directly via command line.
echo Installing typescript and typings
call npm install typescript -g && npm install typings -g
IF !ERRORLEVEL! NEQ 0 goto error
Note: The .deployment, deploy.cmd files need to be placed in the root directory of your solution. You could refer to this sample project for details.

Archiving of project with a sub-project fails, but normal build works

I have a project which uses the ADALiOS project. This project is included in my project, and it works all fine when building to debug on my phone. However, I want to submit the App to the App Store and Archive but I get the following error:
PhaseScriptExecution Run\ Script /Users/User/Library/Developer/Xcode/DerivedData/projectX-gperwbbtttggqpcvozenraexrhrx/Build/Intermediates/ArchiveIntermediates/projectX\ Dev/IntermediateBuildFilesPath/ADALiOS.build/Release-iphoneos/ADALiOS.build/Script-8B19339718BAEDE4008FD93A.sh
cd "/Users/User/Documents/Xcode development/azure-activedirectory-library-for-objc/ADALiOS"
/bin/sh -c \"/Users/User/Library/Developer/Xcode/DerivedData/projectX-gperwbbtttggqpcvozenraexrhrx/Build/Intermediates/ArchiveIntermediates/projectX\ Dev/IntermediateBuildFilesPath/ADALiOS.build/Release-iphoneos/ADALiOS.build/Script-8B19339718BAEDE4008FD93A.sh\"
Creating Framework folder structure at /Users/User/Library/Developer/Xcode/DerivedData/projectX-gperwbbtttggqpcvozenraexrhrx/Build/Intermediates/ArchiveIntermediates/projectX Dev/BuildProductsPath/Release-iphoneos/ADALiOS
Copying public headers from /Users/User/Library/Developer/Xcode/DerivedData/projectX-gperwbbtttggqpcvozenraexrhrx/Build/Intermediates/ArchiveIntermediates/projectX Dev/InstallationBuildProductsLocation/usr/local/lib/Headers/ADALiOS/
cp: /Users/User/Library/Developer/Xcode/DerivedData/projectX-gperwbbtttggqpcvozenraexrhrx/Build/Intermediates/ArchiveIntermediates/projectX Dev/InstallationBuildProductsLocation/usr/local/lib/Headers/ADALiOS/: No such file or directory
I am Archiving using the 'Generic iOS Device' option. I have tried a clean build followed many hints from other build problems but nothing seems to help.
Any suggestion on what could be wrong?
[EDIT:]
I got a clean version of the ADALiOS git repo and this too builds, but does not achieve with the same problem, so it could be related to the ADALiOS project, even though I do not knowhow and why.

Resources