I am trying to add an application to existing project but it's failing when running "ng generate application xyz". Error is:
Schematic input does not validate against the Schema: {"sourceDir":"app","prefix":"app","style":"css","theme":true,"webpack":true}
Errors:
Data path "" should have required property 'name'.
I then used "ng generate application --name=xyz" and the full blown subproject was created but I get the error when I run "ng serve xyz" which says "Project 'xyz' could not be found in workspace.". I Googled but I found nothing matching my problem. All examples generate libraries but I want to generate application not library.
Do I need to manually add the newly generated sub project settings to parent angular.json file?
ng -v
Angular CLI: 6.1.5
Node: 8.11.3
OS: win32 x64
Angular: 6.1.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
#angular-devkit/architect 0.7.5
#angular-devkit/build-angular 0.7.5
#angular-devkit/build-optimizer 0.7.5
#angular-devkit/build-webpack 0.7.5
#angular-devkit/core 0.7.5
#angular-devkit/schematics 0.7.5
#angular/cli 6.1.5
#ngtools/webpack 6.1.5
#schematics/angular 0.7.5
#schematics/update 0.7.5
rxjs 6.3.1
typescript 2.7.2
webpack 4.9.2
According to this you need to add a --name flag in the older version of the cli.
ng generate application --name xyz
And it seems to be a fixed issue.
Related
I'm trying to use the Amazon Elastic Beanstalk Tools for .NET Core applications (4.2.2) to publish a net6.0 app to AWS EB (windows). At the time of writing I need to include the net6.0 runtime since net6.0 is not supported on EB yet.
I can successfully publish my app to AWS using the AWS Toolkit for Visual Studio.
The toolkit calls dotnet publish with the following parameters:
Executing: dotnet publish "[my project path]" --output "[my project path]\bin\Release\net6.0\publish" --configuration "Release" --framework "net6.0" --runtime win-x64 --self-contained true
The toolkit creates this config file (aws-beanstalk-tools-defaults.json) following a successful publish:
{
"additional-options" : "",
"application" : "myApp",
"app-path" : "/",
"configuration" : "Release",
"enable-xray" : false,
"enhanced-health-type" : "enhanced",
"environment" : "myApp-test",
"framework" : "net6.0",
"iis-website" : "Default Web Site",
"region" : "eu-west-1",
"self-contained" : true,
"runtime" : "win-x64"
}
However when I try to use the command line utility with the command:
dotnet eb deploy-environment -cfg myConfFile.json
the self-contained and runtime parameters are not passed to the dotnet deploy call resulting in this call:
dotnet publish "my project path]" --output "my project path]\bin\Release\net6.0\publish" --configuration "Release" --framework "net6.0"
I have tried passing the parameters without using the config file as
dotnet eb deploy-environment --profile XXX -c Release -env myApp-test -po --runtime "win-x64"
only to get trigger this exception:
System.InvalidOperationException: Required argument missing for option: --runtime
Is there anyway to use this utility to publish a net6.0 app using self-contained bundled to a windows based EB instance ?
This is a bug/limitation in version 4.2.2 of AWS Beanstalk Tools for .NET Core.
The utility only reads this parameter for non windows environments.
There is however a workaround.
It is possible to pass the win-x64 parameter using the --publish-options parameter like this:
dotnet eb deploy-environment -c Release -cfg myConfFile --publish-options "--runtime win-x64" "--self-contained true"
This will actually result in a warning:
warning NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used.
But the self contained image will still get published. You can actually skip the --self-contained parameter. The result will be the same.
when trying to display an ipyaggrid object, i get:
"Error displaying widget: model not found".
the same notebook works fine in jupyter notebook.
Here is
"conda list jupyter"
# packages in environment at C:\Users\cocoj\.conda\envs\py39:
#
# Name Version Build Channel
jupyter 1.0.0 py39haa95532_7
jupyter-packaging 0.7.12 pyhd3eb1b0_0
jupyter_client 6.1.12 pyhd3eb1b0_0
jupyter_console 6.4.0 pyhd3eb1b0_0
jupyter_core 4.7.1 py39haa95532_0
jupyter_server 1.4.1 py39haa95532_0
jupyterlab 3.0.14 pyhd3eb1b0_1
jupyterlab_pygments 0.1.2 py_0
jupyterlab_server 2.4.0 pyhd3eb1b0_0
jupyterlab_widgets 1.0.0 pyhd3eb1b0_1
and here is the "jupyter labextension list"
JupyterLab v3.0.14
C:\Users\cocoj\.conda\envs\py39\share\jupyter\labextensions
jupyterlab-plotly v5.2.2 enabled ok
#jupyter-widgets/jupyterlab-manager v3.0.0 enabled ok (python, jupyterlab_widgets)
#voila-dashboards/jupyterlab-preview v2.0.2 enabled ok (python, voila)
Other labextensions (built into JupyterLab)
app dir: C:\Users\cocoj\.conda\envs\py39\share\jupyter\lab
ipyaggrid v0.2.1 enabled ok
fwiw, the ipywidgets, the plotly figureWidgets are all displayed fine in Jupyter Lab.
in particular,
523.fa256ee012d38a89b65a.js:1 Uncaught (in promise) Error: Module ipyaggrid, semver range ~0.2.1 is not registered as a widget module
I simply do the following:
ng new my-proj
cd my-proj
ng add #angular/material
I get in response the following error:
Your project is not using the default configuration for build and test.
The Angular Material schematics can only be used with the default
configuration
Seriously?? Anyone else?
Config:
Package Version
-----------------------------------------------------------
#angular-devkit/architect 0.8.1
#angular-devkit/build-angular 0.8.1
#angular-devkit/build-optimizer 0.8.1
#angular-devkit/build-webpack 0.8.1
#angular-devkit/core 0.8.1
#angular-devkit/schematics 0.8.1
#angular/cli 6.2.1
#angular/material 6.4.7
#ngtools/webpack 6.2.1
#schematics/angular 0.8.1
#schematics/update 0.8.1
rxjs 6.2.2
typescript 2.9.2
webpack 4.19.0
As shown below, the severity icon on the message box covers the actual message. Has anyone else experienced this and/or knows of a way to resolve it (in a manner that doesn't require hacking on the source code)? Thank you.
Versions:
"primeicons": "1.0.0-beta.10",
"primeng": "6.1.0",
Angular CLI: 6.0.8
Node: 8.9.4
OS: win32 x64
Angular: 6.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
#angular-devkit/architect 0.6.8
#angular-devkit/build-angular 0.7.2
#angular-devkit/build-optimizer 0.7.2
#angular-devkit/build-webpack 0.7.2
#angular-devkit/core 0.6.8
#angular-devkit/schematics 0.6.8
#angular/cli 6.0.8
#ngtools/webpack 6.1.2
#schematics/angular 0.6.8
#schematics/update 0.6.8
rxjs 6.2.2
typescript 2.7.2
webpack 4.9.2
I am not able to resolve this issue from so long please do help me anyone..
Apple Mach-O Linker (Id) Error
Linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify- bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/newNotify.app/newNotify normal arm64
cd /Users/anubhavpilania/newNotify/ios
export IPHONEOS_DEPLOYMENT_TARGET=11.4
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -
L/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos -F/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef
/Build/Products/Debug-iphoneos -filelist /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -miphoneos-version-min=11.4 -Xlinker -object_path_lto -Xlinker /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -lc++ -ObjC /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTPushNotification.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTBlob.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAzureNotificationHubManager.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libWindowsAzureMessaging.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAnimation.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libReact.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTActionSheet.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTGeolocation.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTImage.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTLinking.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTNetwork.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTSettings.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTText.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTVibration.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify_dependency_info.dat -o /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/newNotify.app/newNotify
duplicate symbol _RCTRemoteNotificationReceived in:
/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTPushNotification.a(RCTPushNotificationManager.o)
/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAzureNotificationHubManager.a(RCTAzureNotificationHubManager.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In my case this issue occurred when I switched from PushNotificationIOS provided with the React Native core to the extracted version from #react-native-community/push-notification-ios. (Around version RN 0.60)
After linking the new library and installing the CocoaPods dependencies of the iOS project this issue started popping up.
For some reason while setting up the core RN Push Notification library I manually added libRCTPushNotification.a to the "Linked Frameworks and Libraries" of my project. Removing this reference to the core library resolved the issue and let me compile again.
The PushNotificationIOS was split out from the core React Native. So this issue comes up when migrating to the new module #react-native-community/push-notification-ios.
To fix this, just remove or comment out the PushNotificationIOS library from the Podfile: ./ios/Podfile
pod 'React-RCTPushNotification', :path => '../node_modules/react-
native/Libraries/PushNotificationIOS'
Then, run the following commands:
rm -rf Pods
pod install
Rebuild and then run your project.
If you are using a Podfile you can also remove React-RCTPushNotification and add the following...
pod 'RNCPushNotificationIOS', :path => '../node_modules/#react-native-community/push-notification-ios'
because React-RCTPushNotification is from 'react-native' but push notifications has been moved to #react-native-community.
I ran into the same issue as #Padarom, upgrading.
In Podfile, I had to remove the RCTPushNotification line
pod 'React',
:path => "../node_modules/react-native",
:inhibit_warnings => true,
:subspecs => [
"Core",
"ART",
"RCTActionSheet",
"RCTAnimation",
"RCTCameraRoll",
.....
"RCTPushNotification", <== REMOVE
after another pod install it worked