I am getting the following error when I run my angular application. Front end is in angular and back-end uses spring.
build.js:1 **EXCEPTION: Uncaught (in promise): Error: No provider for t!
Error: No provider for t!**
at e [as constructor] (http://localhost:8080/xo-as/ng/build.js:1:59315)
at e [as constructor] (http://localhost:8080/xo-as/ng/build.js:1:60416)
at new e (http://localhost:8080/xo-as/ng/build.js:1:60744)
at t._throwOrNull (http://localhost:8080/xo-as/ng/build.js:1:71064)
at t._getByKeyDefault (http://localhost:8080/xo-as/ng/build.js:1:71402)
at t._getByKey (http://localhost:8080/xo-as/ng/build.js:1:70782)
at t.get (http://localhost:8080/xo-as/ng/build.js:1:69150)
at e.get (http://localhost:8080/xo-as/ng/build.js:1:126499)
at e.t.injectorGet (http://localhost:8080/xo-as/ng/build.js:1:152798)
at e.get (
When I researched online for solutions I came across few posts where they mentioned it is because of some CookieOptions.
In the following link, they have suggested some solutions as well.
https://github.com/salemdar/angular2-cookie/issues/37
And I tried the following:
import { CookieService } from 'angular2-cookie/services/cookies.service';
import { CookieService, CookieOptions } from 'angular2-cookie/core';
When I build I am getting an error message saying 'CookieService' is not exported by 'node_modules/angular2-cookie/services/cookies.service.js'
What am I supposed to do to import it properly?
Please let me know if I need to provide any other information?
Edit :
I am able to import the CookieOptions now using the following
import { CookieService, CookieOptions } from 'ngx-cookie';
But still when I run the application I am getting the error
Error: No provider for t! at e [as constructor]
angular2-cookie is deprecated. You should use ngx-cookie.
Related
I am trying to do a mini react project and am using external API. I am getting this weird error. Before I was getting error when doing any type of import, but then I added type: "module" in package.json, so now instead I get completely different type of error.
Error:
node:internal/errors:484
ErrorCaptureStackTrace(err);
^
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".tmp" for /Users/rokas/Projects/quiz-website/src/node_7c47523b50d8c.tmp
at new NodeError (node:internal/errors:393:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:79:11)
at defaultGetFormat (node:internal/modules/esm/get_format:121:38)
at defaultLoad (node:internal/modules/esm/load:81:20)
at nextLoad (node:internal/modules/esm/loader:163:28)
at ESMLoader.load (node:internal/modules/esm/loader:605:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22)
at new ModuleJob (node:internal/modules/esm/module_job:63:26)
at #createModuleJob (node:internal/modules/esm/loader:480:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
Node.js v18.12.1
Thoughts?
when i try to import path then this error occured and when i don't import path then show me another error that path module can't found. how can i solve this issue ?
Errors here
My Code here
./server.sh
internal/modules/run_main.js:54
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/racal/JavaScript/pluralsight/AngularFundamentalsFiles/DemoApp/scripts/eventsController' imported from /home/racal/JavaScript/pluralsight/AngularFundamentalsFiles/DemoApp/scripts/web-server.js
at finalizeResolution (internal/modules/esm/resolve.js:272:11)
at moduleResolve (internal/modules/esm/resolve.js:652:10)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:695:13)
at Loader.resolve (internal/modules/esm/loader.js:97:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:243:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:42:40)
at link (internal/modules/esm/module_job.js:41:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
and in web console
angular.js:10413 GET http://127.0.0.1:5500/app/lib/app/data/event 404 (Not Found)
please help me
I wanted to change event data about an event object in javascript, a json-file
I'm following the howtographql + React tutorial right now. I'm currently at the beginning of the tutorial when I have to define my queries, mutation and stuff in my schema.graphql. But according to the tutorial, I have to import prisma.graphql from the generatedfolder by writing the following line :
# import Link, Vote, LinkSubscriptionPayload, VoteSubscriptionPayload from "./generated/prisma.graphql"
I indeed generated the serverfolder which contains everything except this file that is supposed to be generated as well I guess.
Apparently, I should be able to run the server using yarn startbut when I'm doing so, I have this message :
Error: Cannot find module './generated/prisma.graphql'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
at resolveFileName (/Users/hamza/tfeScreen/reactapp/react-apollo/server/node_modules/resolve-from/index.js:29:39)
at resolveFrom (/Users/hamza/tfeScreen/reactapp/react-apollo/server/node_modules/resolve-from/index.js:43:9)
at module.exports (/Users/hamza/tfeScreen/reactapp/react-apollo/server/node_modules/resolve-from/index.js:46:41)
at resolveModuleFilePath (/Users/hamza/tfeScreen/reactapp/react-apollo/server/node_modules/graphql-import/dist/index.js:150:24)
at /Users/hamza/tfeScreen/reactapp/react-apollo/server/node_modules/graphql-import/dist/index.js:187:30
at Array.forEach (<anonymous>)
at collectDefinitions (/Users/hamza/tfeScreen/reactapp/react-apollo/server/node_modules/graphql-import/dist/index.js:185:16)
at Object.importSchema (/Users/hamza/tfeScreen/reactapp/react-apollo/server/node_modules/graphql-import/dist/index.js:73:14)
at mergeTypeDefs (/Users/hamza/tfeScreen/reactapp/react-apollo/server/node_modules/graphql-yoga/dist/index.js:412:37)
I don't understand what I'm doing wrong...
Do you guys have any idea ?
I have started to get a new error while developing my current project. I have noticed that the error only occurs on Android and I have tried most of the solutions out there.
undefined is not a function (evaluating '_.keys(resultingStyle)[typeof Symbol === "function" ? Symbol.iterator : "##iterator"]()')
So this is the error. I have already tried the coreJs solutions and the es6-symbol solutions but I still get the same error.
import 'core-js/es6/map'
import 'core-js/es6/symbol'
import 'core-js/fn/symbol/iterator'
and/or
import 'es6-symbol/implement'
Does anyone have any ideas please?