I am getting following error when running ng serve - json

I'm new and I have a problem with VSCode. I am getting the following error when running ng serve:
PS C:\Windows\System32\x-app> ng serve --configuration=it
An unhandled exception occurred: Workspace config file cannot le loaded: C:\Windows\System32\x-app\angular.json
Invalid JSON character: "\"" at 73:7.
See "C:\Users\C-PROJ~1\AppData\Local\Temp\ng-LpcKJr\angular-errors.log" for further details
[error] Error: Workspace config file cannot le loaded: C:\Windows\System32\x-app\angular.json
Invalid JSON character: "\"" at 73:7.
at Object.getWorkspace (C:\Windows\System32\x-app\node_modules\#angular\cli\utilities\config.js:59:15)
at ServeCommand.validateScope (C:\Windows\System32\x-app\node_modules\#angular\cli\models\command.js:97:60)
at ServeCommand.validateAndRun (C:\Windows\System32\x-app\node_modules\#angular\cli\models\command.js:122:24)
at Object.runCommand (C:\Windows\System32\x-app\node_modules\#angular\cli\models\command-runner.js:185:38)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
I use prettier, in fa,ct I noticed that there was an oversight about internalization. I fixed the json file, and returned the command ng serve --configuration=it, but the result is another error.
PS C:\Windows\System32\x-app> ng serve --configuration=it
An unhandled exception occurred: Project does not exist.
See "C:\Users\C-PROJ~1\AppData\Local\Temp\ng-IomfPN\angular-errors.log" for further details.
[error] Error: Project does not exist.
at WorkspaceNodeModulesArchitectHost.findProjectTarget (C:\Windows\System32\x-app\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js:94:23)
at WorkspaceNodeModulesArchitectHost.getOptionsForTarget (C:\Windows\System32\x-app\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js:66:33)
at core_1.experimental.jobs.createJobHandler.target (C:\Windows\System32\x-app\node_modules\#angular-devkit\architect\src\architect.js:171:21)
at Observable.rxjs_1.Observable.subject [as _subscribe] (C:\Windows\System32\x-app\node_modules\#angular-devkit\core\src\experimental\jobs\create-job-handler.js:91:26)
at Observable._trySubscribe (C:\Windows\System32\x-app\node_modules\rxjs\internal\Observable.js:44:25)
at Observable.subscribe (C:\Windows\System32\x-app\node_modules\rxjs\internal\Observable.js:30:22)
at C:\Windows\System32\x-app\node_modules\rxjs\internal\util\subscribeTo.js:22:31
at Object.subscribeToResult (C:\Windows\System32\x-app\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)
at SwitchMapSubscriber._innerSub (C:\Windows\System32\x-app\node_modules\rxjs\internal\operators\switchMap.js:65:54)
at SwitchMapSubscriber._next (C:\Windows\System32\x-app\node_modules\rxjs\internal\operators\switchMap.js:55:14)
at SwitchMapSubscriber.Subscriber.next (C:\Windows\System32\x-app\node_modules\rxjs\internal\Subscriber.js:66:18)
at SwitchMapSubscriber.notifyNext (C:\Windows\System32\x-app\node_modules\rxjs\internal\operators\switchMap.js:86:26)
at InnerSubscriber._next (C:\Windows\System32\x-app\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (C:\Windows\System32\x-app\node_modules\rxjs\internal\Subscriber.js:66:18)
at MapSubscriber._next (C:\Windows\System32\x-app\node_modules\rxjs\internal\operators\map.js:55:26)
at MapSubscriber.Subscriber.next (C:\Windows\System32\x-app\node_modules\rxjs\internal\Subscriber.js:66:18)

your angular.json is probably malformed. please check if the file complies to the json standard. you may use tools like prettier to format the json.

Related

No files matching the pattern "**/*.{css,scss}" were found

I am using Github and linters and with style linters its showing me this error:
Error: No files matching the pattern "**/*.{css,scss}" were found.
at /home/runner/work/Microverse-Airline/Microverse-Airline/node_modules/stylelint/lib/standalone.js:212:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Process completed with exit code 1.
Here is the link to my github repository: https://github.com/saqibjavaiddev/Microverse-Airline/pull/24

firebase functions deploy got an error with file path that contains "\"

When I tried to deploy firebase functions, the process of loading credential file occurs an error:
Detailed stack trace: Error: Failed to read credentials from file C:\Users\kracc\Desktop\code\glint-server\firebase-account.json: Error: ENOENT: no such file or directory, open 'C:\Users\kracc\Desktop\code\glint-server\firebase-account.json'
Initialization code:
private connectFireStore(): void {
initializeApp({
credential: applicationDefault(),
databaseURL: process.env.FIRESTORE_URL,
})
}
folder structure:
and value of GOOGLE_APPLICATION_CREDENTIALS in .env.prod is ../../firebase-account.json
I can open C:\Users\kracc\Desktop\code\glint-server\firebase-account.json and it works well when I use emulator and local server
reason why I think the backslash matters is I saw it couldn't understand backslash included path in require function (require('./lib\\foo') got an error).
how can I deal with this situation?

How do I fix this error in with deps.edn file?

I have created a project called tutorial with a deps.edn file in it. I also have a core.cljs file in tutorial/src/appy.
When I run the command clj -m cljs.main --compile appy.core --repl following a tutorial I get an error.
Error building classpath. Error reading edn. Map literal must contain an even number of forms (C:\Users\...\tutorial\deps.edn)
The content of the deps.edn file is
{:deps {org.clojure/clojurescript {:mvn/version "1.10.773"}}
:paths ["src"]}
I understand the error but not why it is generated.

How to Implement react-native-maps in Android

hi I've been using the React-Native-Maps library from https://github.com/lelandrichardson/react-native-maps/blob/master/docs/installation.md with a real android divice and i followed the installation but when i start to use CMD and write 'react-native run-andorid', i got error this msg.
:app:dexDebug
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
Unknown source file : at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
Unknown source file : at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
Unknown source file : at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
Unknown source file : at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
Unknown source file : at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
Unknown source file : at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
Unknown source file : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file : at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file : at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file : at com.android.dx.command.Main.main(Main.java:106)
:app:dexDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:
Process 'command 'C:\Program Files\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
help me plz!
Most probably the problem is with gradle cache for Android. Try running the below command at the root of your project
cd android && ./gradlew clean

Problems with Clojurescript quickstart -- build fails

I'm trying to follow the Clojurescript Quick-Start
I have downloaded the Clojurescript jar as described in the Quick-Start guide. I have verified that it has the appropriate size (about 19M). I have created the files. But when I try to build using the command:
java -cp cljs.jar:src clojure.main build.clj
Java returns the following stacktrace:
Exception in thread "main" java.io.FileNotFoundException: Could not locate cls/build/api__init.class or cls/build/api.clj on classpath., compiling:(/Users/jnedzel/Documents/prj/closurescript/quickstart/hello_world/build.clj:1:1)
at clojure.lang.Compiler.load(Compiler.java:7249)
at clojure.lang.Compiler.loadFile(Compiler.java:7175)
at clojure.main$load_script.invoke(main.clj:275)
at clojure.main$script_opt.invoke(main.clj:337)
at clojure.main$main.doInvoke(main.clj:421)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.lang.Var.invoke(Var.java:379)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate cls/build/api__init.class or cls/build/api.clj on classpath.
Any ideas?
TL;DR: There's a typo in build.clj
Full explanation
As of the Quick-Start, the file build.clj should have the following content:
(require 'cljs.build.api)
(cljs.build.api/build "src" {:output-to "out/main.js"})
The error message says Could not locate cls/build/api__init.class. When the clojure compiler compiles a ns, a loader classfile is generated with the name my/domain/lib__init.class. That's the class that will be loaded given (require 'my.domain.lib).
In the case of cljs.build.api, that would be cljs/build/api__init.class. But it is trying to load cls/build/api__init.class instead, so you have a typo there.