Flutter packages not recognised in Android Studio - android-studio

Flutter(1.22.5) packages are not recognized in Android Studio(Windows-10(64bit)),eventhough they are available in the "C:\src\flutter\packages\flutter\lib" directory.
How to resolve this?
Flutter path - C:\src\flutter
DartSdk path - C:\src\flutter\bin\cache\dart-sdk
Packages -
C:\src\flutter>cd "C:\src\flutter\packages\flutter\lib"
C:\src\flutter\packages\flutter\lib>dir
Volume in drive C has no label.
Volume Serial Number is 2EAF-73E1
Directory of C:\src\flutter\packages\flutter\lib
16-Dec-20 04:43 PM <DIR> .
16-Dec-20 04:43 PM <DIR> ..
16-Dec-20 04:43 PM 3,076 analysis_options_user.yaml
16-Dec-20 04:43 PM 9,707 animation.dart
16-Dec-20 04:43 PM 2,024 cupertino.dart
16-Dec-20 04:43 PM 1,777 foundation.dart
16-Dec-20 04:43 PM 1,216 gestures.dart
16-Dec-20 04:43 PM 6,018 material.dart
16-Dec-20 04:43 PM 2,464 painting.dart
16-Dec-20 04:43 PM 677 physics.dart
16-Dec-20 04:43 PM 3,170 rendering.dart
16-Dec-20 04:43 PM 694 scheduler.dart
16-Dec-20 04:43 PM 707 semantics.dart
16-Dec-20 04:43 PM 1,664 services.dart
16-Dec-20 04:43 PM <DIR> src
16-Dec-20 04:43 PM 5,308 widgets.dart
13 File(s) 38,502 bytes
3 Dir(s) 27,227,918,336 bytes free
main.dart -
import 'package:flutter/material.dart';
import 'C:\src\flutter\packages\flutter\lib\material.dart';
ERROR -
Error: Could not resolve the package 'flutter' in 'package:flutter/material.dart'.
^
lib/main.dart:6:8: Error: Not found: 'package:flutter/material.dart'
import 'package:flutter/material.dart';
^
lib/main.dart:7:8: Error: Error when reading 'c:src%0Clutterpackages%0Clutterlibmaterial.dart': StandardFileSystem only supports file:* and data:* URIs
import 'C:\src\flutter\packages\flutter\lib\material.dart';

The original project was created by downloading Flutter via Git ,maybe the latest Flutter version has some bugs.
Downloading Flutter stable version from the official website solved the issue.

Related

Core Node.js module "fs" Not Found when #fastify/static deployed on render.com

It is my understanding that the core modules, like "fs" are part of the node.js build, and no special configuration is needed to make them available for importing, so I'm at a loss as to how "fs" could be missing when running on render.com. I have no problems building or running in development mode locally. And the service deploys and builds perfectly on render.com, but running fails with:
Jan 31 01:13:22 PM ==> Starting service with 'node index.js'
Jan 31 01:13:23 PM internal/modules/cjs/loader.js:888
Jan 31 01:13:23 PM throw err;
Jan 31 01:13:23 PM ^
Jan 31 01:13:23 PM
Jan 31 01:13:23 PM **Error: Cannot find module 'node:fs'**
Jan 31 01:13:23 PM Require stack:
Jan 31 01:13:23 PM - /opt/render/project/src/node_modules/#fastify/send/lib/SendStream.js
Jan 31 01:13:23 PM - /opt/render/project/src/node_modules/#fastify/send/index.js
Jan 31 01:13:23 PM - /opt/render/project/src/node_modules/#fastify/static/index.js
Jan 31 01:13:23 PM - /opt/render/project/src/index.js
Jan 31 01:13:23 PM at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
Jan 31 01:13:23 PM at Function.Module._load (internal/modules/cjs/loader.js:730:27)
Jan 31 01:13:23 PM at Module.require (internal/modules/cjs/loader.js:957:19)
Jan 31 01:13:23 PM at require (internal/modules/cjs/helpers.js:88:18)
Jan 31 01:13:23 PM at Object.<anonymous> (/opt/render/project/src/node_modules/#fastify/send/lib/SendStream.js:10:12)
Jan 31 01:13:23 PM at Module._compile (internal/modules/cjs/loader.js:1068:30)
Jan 31 01:13:23 PM at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
Jan 31 01:13:23 PM at Module.load (internal/modules/cjs/loader.js:933:32)
Jan 31 01:13:23 PM at Function.Module._load (internal/modules/cjs/loader.js:774:14)
Jan 31 01:13:23 PM at Module.require (internal/modules/cjs/loader.js:957:19) {
Jan 31 01:13:23 PM code: 'MODULE_NOT_FOUND',
Jan 31 01:13:23 PM requireStack: [
Jan 31 01:13:23 PM '/opt/render/project/src/node_modules/#fastify/send/lib/SendStream.js',
Jan 31 01:13:23 PM '/opt/render/project/src/node_modules/#fastify/send/index.js',
Jan 31 01:13:23 PM '/opt/render/project/src/node_modules/#fastify/static/index.js',
Jan 31 01:13:23 PM '/opt/render/project/src/index.js'
Jan 31 01:13:23 PM ]
Jan 31 01:13:23 PM }
The service was running merrily along until I deployed a new version today that requires the #fastify/static package, like this:
fastify.register(require('#fastify/static'), { root: path.join(__dirname,'public'), prefix:'/public/' })
I never import "fs" directly, but #fastify/static apparently does, like this:
const statSync = require('fs').statSync
I tried importing fs explicitly before importing #fastify, but the error doesn't change. Webpack is not involved. I've tried building using both npm and yarn, no difference - not that building should affect core modules. Is there some critical environmental setup I have neglected to do on Render.com?
Ronnie's comment (thks!) made me start wondering if my assumption that "node:fs" was the same as "fs" was correct. It was not. Render.com defaults to node.js version 14.17.0. The "node:" module reference syntax was not added until a later version.
The solution was to request node version 16.0.0 on render.com using an environment variable containing the version string, and it fixed the error.
The details for specifying the version on render.com is at https://render.com/docs/node-version
An explanation of the core modules syntax is at https://nodejs.org/api/modules.html

Unable to find pyspark testing module

Although, in source code in github I see pyspark.testing module being present, however, my local environment is throwing error that pyspark.testing is not found.
https://github.com/apache/spark/blob/master/python/pyspark/testing/sqlutils.py#L27
(Source Code)
Have installed pyspark as
pip install pyspark
Folder structure inside pyspark module in conda environment:
d---- 6/2/2022 12:15 PM bin
d---- 6/2/2022 12:15 PM cloudpickle
d---- 6/2/2022 12:15 PM data
d---- 6/2/2022 12:15 PM examples
d---- 6/2/2022 12:15 PM jars
d---- 6/2/2022 12:15 PM licenses
d---- 6/2/2022 12:15 PM ml
d---- 6/2/2022 12:15 PM mllib
d---- 6/2/2022 12:15 PM pandas
d---- 6/2/2022 12:15 PM python
d---- 6/2/2022 12:15 PM resource
d---- 6/2/2022 12:15 PM sbin
d---- 6/2/2022 12:15 PM sql
d---- 6/2/2022 12:15 PM streaming
Although all other folders from git repo are present, however, testing folder is not present.
Installed pyspark version
pyspark==3.2.1

Unable to access WebGL app as Azure Web App

I'm trying to deploy a Unity WebGL app to Azure to run as a Web App. But I cannot get the app to deploy. I am using the latest version of Unity (2022.1.3f1).
I have built the app, and here are the contents of my `Build`` directory:
# Build> ll
-rw-r--r-- 1 DKS0510862 staff 3664517 Jun 9 11:12 DSG Westy Unity PoC.data.gz
-rw-r--r-- 1 DKS0510862 staff 78822 Jun 9 11:14 DSG Westy Unity PoC.framework.js.gz
-rw-r--r--# 1 DKS0510862 staff 20484 Jun 9 11:09 DSG Westy Unity PoC.loader.js
-rw-r--r-- 1 DKS0510862 staff 7390463 Jun 9 11:14 DSG Westy Unity PoC.wasm.gz
In VS Code, I am navigating to the Build directory, right-clicking on the directory, and then selecting Deploy to Web App. I am logged in to Azure, and I am prompted to select the App Service that I created in Azure, so my connection is okay.
The deployment seems to have run successfully.
4:02:14 PM innovation-unity-poc-dev: Starting deployment...
4:02:18 PM innovation-unity-poc-dev: Creating zip package...
4:02:22 PM innovation-unity-poc-dev: Zip package size: 10.9 MB
4:02:24 PM innovation-unity-poc-dev: Updating submodules.
4:02:24 PM innovation-unity-poc-dev: Preparing deployment for commit id '38620705e7'.
4:02:24 PM innovation-unity-poc-dev: Generating deployment script.
4:02:24 PM innovation-unity-poc-dev: Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "C:\local\Temp\zipdeploy\extracted" -o "C:\home\site\deployments\tools" --basic --sitePath "C:\local\Temp\zipdeploy\extracted"'.
4:02:26 PM innovation-unity-poc-dev: Generating deployment script for Web Site
4:02:27 PM innovation-unity-poc-dev: Generated deployment script files
4:02:27 PM innovation-unity-poc-dev: Running deployment command...
4:02:27 PM innovation-unity-poc-dev: Command: "C:\home\site\deployments\tools\deploy.cmd"
4:02:30 PM innovation-unity-poc-dev: Handling Basic Web Site deployment.
4:02:30 PM innovation-unity-poc-dev: Creating app_offline.htm
4:02:30 PM innovation-unity-poc-dev: KuduSync.NET from: 'C:\local\Temp\zipdeploy\extracted' to: 'C:\home\site\wwwroot'
4:02:30 PM innovation-unity-poc-dev: Deleting file: 'hostingstart.html'
4:02:30 PM innovation-unity-poc-dev: Copying file: 'DSG Westy Unity PoC.data.gz'
4:02:30 PM innovation-unity-poc-dev: Copying file: 'DSG Westy Unity PoC.framework.js.gz'
4:02:30 PM innovation-unity-poc-dev: Copying file: 'DSG Westy Unity PoC.loader.js'
4:02:30 PM innovation-unity-poc-dev: Copying file: 'DSG Westy Unity PoC.wasm.gz'
4:02:30 PM innovation-unity-poc-dev: Deleting app_offline.htm
4:02:30 PM innovation-unity-poc-dev: Finished successfully.
4:02:30 PM innovation-unity-poc-dev: Running post deployment command(s)...
4:02:30 PM innovation-unity-poc-dev: Triggering recycle (preview mode disabled).
4:02:30 PM innovation-unity-poc-dev: Deployment successful.
4:03:18 PM: Deployment to "innovation-unity-poc-dev" completed.
However, when I try to connect to the app, in the browser I am seeing the error message "You do not have permission to view this directory or page".
I see the following in the Web Server logs, but these don't appear to be error messages.
022-06-09 20:08:09 ~1INNOVATION-UNITY-POC-DEV GET /api/logstream/http X-ARR-LOG-ID=bba7b8a4-5d1e-4616-8f43-5237acd8a969 443 - 199.30.194.254 Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_15_7)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/102.0.5005.61+Safari/537.36 - - innovation-unity-poc-dev.scm.azurewebsites.net 200 0 64 2729 1541 180037
2022-06-09 20:08:20 INNOVATION-UNITY-POC-DEV GET / X-ARR-LOG-ID=628fa657-ed76-4252-a55d-c15b3f4150cf 443 - 199.30.194.254 Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_15_7)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/102.0.5005.61+Safari/537.36 ARRAffinity=22a7daa836b64a8ce56c907737553d08297ff2e76cd06a1f52c29956b9a85c17;+ARRAffinitySameSite=22a7daa836b64a8ce56c907737553d08297ff2e76cd06a1f52c29956b9a85c17 - innovation-unity-poc-dev.azurewebsites.net 403 14 0 422 1626 62
The only entry I am seeing in the Application Logs is a request to the logstream API.
I have no idea where to look to do any more troubleshooting. Is there some way I can see what the filesystem looks like for the app, to see if my files were deployed correctly?

codium + pcmanfm-qt == 70+ CWD and SIZE commands per second

Local: Kubuntu 21.10, VSCodium 1.65.2, PCManFM-qt 0.17.0
Server: Windows Server 2016, FileZilla FTP Server
I use VSCodium (the MS telemetry free version of Visual Studio Code) as my editor, PCManFM-qt as my FTP client. It's a great combination because PCManFM doesn't prompt me to upload and overwrite remote files. Watching my FTP server in real time, the logs are as expected when I open PCManFM. It's fine when I open VSCodium with no open files. However, if I open a file from my server using PCManFM in VSCodium, one of those two programs starts bombarding my server with CWD and SIZE requests:
(000006)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> CWD /inet-folder/webcontent/Admin/printMapping/node_modules
(000006)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 CWD failed. "/inet-folder/webcontent/Admin/printMapping/node_modules": directory not found.
(000004)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> CWD /inet-folder/webcontent/Admin/tsconfig.json
(000004)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 CWD failed. "/inet-folder/webcontent/Admin/tsconfig.json": directory not found.
(000006)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> SIZE /inet-folder/webcontent/Admin/printMapping/node_modules
(000006)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 File not found
(000004)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> SIZE /inet-folder/webcontent/Admin/tsconfig.json
(000004)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 File not found
(000005)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> CWD /inet-folder/webcontent/Admin/jsconfig.json
(000007)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> CWD /inet-folder/webcontent/Admin/printMapping/bower_components
(000005)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 CWD failed. "/inet-folder/webcontent/Admin/jsconfig.json": directory not found.
(000007)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 CWD failed. "/inet-folder/webcontent/Admin/printMapping/bower_components": directory not found.
(000005)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> SIZE /inet-folder/webcontent/Admin/jsconfig.json
(000007)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> SIZE /inet-folder/webcontent/Admin/printMapping/bower_components
(000005)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 File not found
(000007)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 File not found
(000008)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> CWD /inet-folder/webcontent/tsconfig.json
(000008)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 CWD failed. "/inet-folder/webcontent/tsconfig.json": directory not found.
(000008)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> SIZE /inet-folder/webcontent/tsconfig.json
(000008)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 File not found
(000006)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> CWD /inet-folder/webcontent/jsconfig.json
(000006)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 CWD failed. "/inet-folder/webcontent/jsconfig.json": directory not found.
(000006)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> SIZE /inet-folder/webcontent/jsconfig.json
(000006)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 File not found
(000004)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> CWD /inet-folder/tsconfig.json
(000004)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 CWD failed. "/inet-folder/tsconfig.json": directory not found.
(000004)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> SIZE /inet-folder/tsconfig.json
(000004)4/14/2022 22:25:14 PM - ftpuser (11.222.333.444)> 550 File not found
What sticks out to me are "bower_components" and "node_modules." Up to seventy per second. That's okay for a while, but then it starts to interfere with saving files and I get codium and PCManFM both as processes I can't kill.
I don't use github, subversion, bitbucket.
node is installed, but I've never used it that I know of, and I can't figure out how to remove it, or even if I should.
bower is not installed.
I've disabled all VSCodium extensions.
I've tried every combination of Dolphin, PCManFM, VSCodium, Kate, and Visual Studio Code.
ADDITIONAL INFO: this only happens with .js files. Once a .js file is opened, the server starts getting hit. Closing the .js file doesn't stop the behavior. Only closing VSCode stops it - if I do it before it locks up.
This behavior doesn't happen with Dolphin. It doesn't happen with Kate or Visual Studio Code, with .html/.css/.asp/.json files. Only the combination of VSCodium and PCManFM-QT and javascript files. I don't even know how to begin tracking down this issue.
The end goal is to stop the server bombardment and retain the use of VSCodium and PCManFM-QT if possible. Help!
SOLVED: I renamed the node_modules folder in /usr/share/codium/resources/app/extensions to somethingelse and the problem went away. Codium still appears to be operating normally.

webapp doesn't exist with Azure CLI 2.0.79

I have upgraded recently to 2.0.79 due to the problems with 2.0.78 caused with static HTML pages
I am following this Microsoft tutorial but keep getting the error
"webapp anotherwebapp doesn't exist"
when I enter the command:
az webapp up --location westeurope --name anotherwebapp --html
The contents on the directory is listed below (dir):
08/01/2020 08:27 PM <DIR> .
08/01/2020 08:27 PM <DIR> ..
08/01/2020 08:27 PM 4,447 .gitignore
08/01/2020 08:27 PM <DIR> css
08/01/2020 08:27 PM <DIR> fonts
08/01/2020 08:27 PM <DIR> img
08/01/2020 08:27 PM 2,338 index.html
08/01/2020 08:27 PM <DIR> js
08/01/2020 08:27 PM 1,183 LICENSE
08/01/2020 08:27 PM 608 README.md
4 File(s) 8,576 bytes
6 Dir(s) 1,214,520,279,040 bytes free
Any help with resolving this would be much appreciated!
First, are you sure "webapp anotherwebapp doesn't exist" is an error message? it should be a prompt since it actually does not exist.
I can successfully deploy it with 2.0.79, and the steps are as below:
1.Install azure cli 2.0.79 via downloading the .msi, then restarts the machcine.
2.Then in cmd prompt, nav to the folder where my html project resides -> run the command:
az webapp up --location westeurope --name anotherwebapp111 --html
The screenshot as below:
3.Nav to azure portal, I can see the site is deployed successfully.

Resources