nx --platform not selecting platform - ionic-framework

I'm busy with some devops so I need everything to run in terminal
However, running the below command still brings up the prompt to select the platform and blocks any further execution.
nx run myProject:add --platform android
Any one having this issue?

Documentation was incorrect
fixed it with
nx run myProject:add:android

Related

Flutter command not working after running "flutter upgrade"

I recently tried running flutter upgrade and it seemed to run successfully. But after that the flutter command itself stopped working. Every time I try to run a flutter command it gives this error
'sysctl -n hw.optional.arm64' returned unexpected output: ''
I'm using a MacBook Pro with an Intel i7 processor.
I couldn't find anything on this error online. I also tried doing a git reset and a git pull on the flutter (core) directory. Nothing seems to help.
What could the issue be?
I managed to fix it. For some reason after upgrading flutter the path variable got messed up, at least in my .zshrc file. So I had to go and add the usr/sbin path to the PATH variable. That's where the sysctl program sits and that's why it was giving an error that the output is empty.
Hope this helps someone.

Unable to 'Build and Run IoT Edge Simulator' in Visual Studio Code on macOS

Have been trying to build and run a custom Azure IoT Edge Module, in VS Code, on macOS. When I try to Build and Run IoT Edge Solution in Simulator, the
Please setup iotedgehubdev first before starting simulator
alert pops up. Completed the setup successfully and yet, every time this very warning pops up and am unable to perform the 'build and run' process.
I had the same issue today working on a fresh linux install on my laptop.
I figured that the simulator needs 3 steps:
setup (using a real device connection string)
start (actually runs docker-compose, and if use -v, will show docker logs)
stop
I setup vscode and going through the example at
https://learn.microsoft.com/en-us/azure/iot-edge/how-to-vs-code-develop-module?view=iotedge-2020-11
then find out several things:
first vscode detects that there is a DevContainer definition, and offers to open in DevContainer - which I did but is unexpected
that means that setup for azureiothubdev on the host linux is unnecessary
and that had issues with versions of pyyaml , had to downgrade to 5.4.1
will now uninstall this
second, when I try to right click (contextual menu in Azure Iot Hub extension) on the device I choose to run the simulator as, it does 'setup IoT Edge Simulator' correctly.
third, when trying the command palette approach to 'Run IoT Edge Solution in the simulator', it does what the OP describes, with a popup at the bottom asking to choose the device, and when done with setup, just stops there.
In the end, I read the instructions related to the Azure Iot EdgeHub dev tool
https://github.com/Azure/iotedgehubdev.
Here is how I got it to work:
ran 2 actions in contextual menu for deployment.debug.template.json,
Generate IoT Edge Deployment Manifest
Build and Push IoT Edge Solution
ran 1 action in the context menu for my device in AZURE IOT HUB extension
Setup IoT Edge Simulator, which runs commands in the terminal
ran one command manually in the terminal to fill the gap
sudo "iotedgehubdev" start -d ./config/<your debug deployment file> -v
stopped on a breakpoint in the sample module (the whole point of the endeavor)
in your module, set a breakpoint, in a message handler perhaps
enter debug menu (CTRL+SHIFT+D)
select the config for your (C#) module with 'Remote Debug'
click Start Debugging (empty green triangle) or press F5
select the process matching your entrypoint in the dockerfile (mine was 'dotnet SampleModule.dll')
At this point you are attached to the program running in a container, and the breakpoint should get hit as expected.
you can't use the command palette to stop the simulator, if you have the -v option where docker-compose gives you logs. the command gets written to the terminal and does nothing in the middle of the logs.
you just have to Ctrl+C in the terminal to end the simulation, though edgehub keeps running.
You stop it with
sudo "iotedgehubdev" stop
I am assuming you have Azure IoT Hub tool extension for VSCode installed. In the explorer menu pane (on left), navigate to 'Azure IoT Hub' -> Pick your Edge device and right click. You will see option 'Setup IoT Simulator' and click.
It will automatically fetch the device connection string for the device. Then you should be able to build it.

Jupyter notebook MATLAB kernel: Runs, but does not display output

The issue is as shown in the image below. The kernel runs but the output is not displayed.
For installation, I followed the steps under 'Python side configuration' and 'MATLAB side configuration' here.
Have tried the following:
All other kernels work normally
The issue persists in both Firefox and Chrome
Edit: There were no issues in the installation of the python engine.
sudo python3 setup.py install
[sudo] password for tinkidinki:
running install
running build
running build_py
running install_lib
copying build/lib/matlab/engine/_arch.txt -> /usr/local/lib/python3.8/dist-packages/matlab/engine
running install_egg_info
Removing /usr/local/lib/python3.8/dist-packages/matlabengineforpython-R2020b.egg-info
Writing /usr/local/lib/python3.8/dist-packages/matlabengineforpython-R2020b.egg-info
Most likely your antivirus program is blocking the output (e.g. Adaware antivirus often causes this problem).
If this is not the case: sometimes the output is shown in the command prompt window instead of in the Jupyter notebook, check if this is the case.
Try restarting the kernel in kernel option (yup, more of a workaround...)

Flutter error Unable to start the daemon process

My flutter project is run smoothly in my old laptop. But when I use my new laptop, my flutter project can't run in debug mode.
This error
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/5.6.2/userguide/gradle_daemon.html
Process command line: C:\Program Files (x86)\Java\jre1.8.0_221\bin\java.exe -Xmx1536M -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\ajoris\.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb\gradle-5.6.2\lib\gradle-launcher-5.6.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.6.2
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Is there something missing in the settings on my new laptop? I tried to clean project, upgrade flutter but always fail. Sorry for new
What actually worked for me is, In windows 10 just turn off your mobile hotspot and run the app again. I think it's a glitch/bug in windows 10.
The solution to this problem is deactivating windows hotspot before running build or app compilation.
Don't delete anything or file, just build the app with mobile hotspot turned off.'
its a windows 10 bug that start without any reason. i refreshed my windows and this started
Flutter or Android Applications
The general steps I would use are:
run flutter doctor in terminal
if you are using an emulator make sure it has enough space (often it needs a restart to clear junk files created upon consecutive deploys)
if the gradle files have been modified it is recommended to open them with Android Studio (Android folder of the application). If anything is missing the IDE will prompt you to install the missing dependencies.
Hope it helps
I tried all the above methods but sadly none of them worked. What eventually worked for me was too simple.
first try all the suggested solutions here and if it doesn't work
try to disable mobile firewall, actually I discovered that it's a windows 10 bug because disabling mobile hotspot just until you build or compile your project then you can reenable it without any problem .
Step 1: Open the Registry Editor on your Windows 10 computer. To do this, just press the Windows + R keys on your keyboard. In the Run dialog box, type “Regedit” and hit enter. This will open the Registry Editor window.
Step 2: In the Registry Editor, navigate to the following location:
HKEY_LOCAL_MACHINE SOFTWARE Policies Microsoft WindowsNetwork Connections
Step 3: In the Network Connections key, on the right-side pane, right-click anywhere in the empty area and select New > DWORD (32-bit) Value.
Step 4: Name the newly created registry “NC_ShowSharedAccessUI” and keep its value as “0” to disable the Mobile Hotspot feature on your laptop.
Step 5: To enable the feature, just change the value of the NC_ShowSharedAccessUI registry from 0 to 1 and the feature will be enabled again.
When the functionality has been disabled, the feature will still appear in the Network & Internet settings but it cannot be enabled or configured. To use the feature, the registry needs to be edited again and enable the functionality.
It looks like a memory problem.
In your project folder, Go to android/gradle.properties.
Change the line
From:
org.gradle.jvmargs=-Xmx1536M
To:
org.gradle.jvmargs=-Xmx1024M
Save the gradle.properties file and try to run debugging again.
That Worked for me :)
Usually it Is bcoz of the .gradle file in C:drive.
1.Locate to the .gradle folder (usually in C:\users\your_username)
2.Delete the .gradle folder once located.
2.Locate to your flutter project folder
2.Locate to android
3.Run gradlew clean
4.Run gradlew build
5.now run your app...It worked for me
I tried all the above methods but sadly none of them worked. What eventually worked for me was simple.
There has been a lot of problem with emulator configuration and sometimes it crashes for a lot of reasons. For the above problem what I recommend is, delete the current emulator but remember the settings like API version and all and make a new emulator.
This worked for me fine!
I'll post what solved for me.
flutter clean
flutter run
Close Android studio
Delete your ".gradle" folder
Open android studio as administrator and allow project to build.
For my case i had --no-sound-null-safety in the Dart: Flutter Additional Args ( go to vscode settings under extensions dart ). I deleted it, deleted the web folder in the project ( i was working on the app only ) then reloaded vscode. the error was gone afterwards
go to C:\Program Files\nodejs
Open npm, npm.cmd, npx, npx.cmd
then change the prefix -g to prefix --location=global
still if this did not work,
go to android studio click on build, then click clear project.
I also faced this issue and this step resolved problem. Still if this did not work out let me know.
Non of the solution in here worked for me. running my vscode or android studio as an administrator solved the problem.
Go to file/setting/build,execution,deployment/gradle, and there where Gradle user home: pass static address.
For example, my address is C:/Users/Admin/.gradle.
After applying if runs OK.
There is a simple solution.
Uninstall the app from your device .
Then restart the PC .
First of all Uninstall the application from emulator.
then wipe all data from the emulator.
Sometimes turning off mobile hotspot will do the work.
After turning off if not work then restart the pc or a laptop. Don't turn on mobile hotspot and run flutter run.

Cordova build command failed

Running command "cordova build" on command prompt result in built failed. Found underneath the error sample. Can someone help me for a quick fix. The aim is to run my first phonegap android hello world project but am stuck with this error.
Try this one
Download ant for windows, http://ant.apache.org/bindownload.cgi. Extract and place it somewhere in your computuer.
Open your CMD and type this command.
SET ANT_HOME=%PATH%;c:\apache-ant-1.9.4-bin
Restart your computer.
http://blog.revivalx.com/2014/11/02/common-errors-during-developing-android-app-in-mac-linux-and-windows-platform/