Angular errors with Linux - angularjs

./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

Related

TypeError [ERR_UNKNOWN_FILE_EXTENSION]

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?

AOT compiled code throws error - No provider for t

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.

Drupal Wiris integration

I followed this tutorial to install the Wiris plugin on a new installation of Drupal.
Once the installation was complete and I clicked on the Wiris icon to begin adding a formula, the popup window does NOT load and I get the following error in the console area:
Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Invalid target origin '/DrupalQuiz/sites/all/libraries/ckeditor/plugins/ckeditor_wiris/' in a call to 'postMessage'.
at http://*.*.*.*/DrupalQuiz/sites/all/libraries/ckeditor/plugins/ckeditor_wiris/core/core.js:19:22
The code causing the problem is as follows:
e.source.postMessage(postVariable, _wrs_conf_path);
I'm at a loss how to deal with this issue.
I don't have a complete fix but I was able to get it working locally by replacing _wrs_conf_path with the base path of my dev box. _wrs_conf_path was evaluating to a relative path to the plugins folder.
if (typeof(e.source) != 'undefined') {
e.source.postMessage(postVariable, _wrs_conf_path);
}
with
if (typeof(e.source) != 'undefined') {
e.source.postMessage(postVariable, _wrs_currentPath);
}
in the /sites/all/libraries/ckeditor/plugins/ckeditor_wiris/core/core.js file.
Edit: I replaced _wrs_conf_path with one of their internal variables _wrs_currentPath and that seemed to fix the issue.

Parsley js remote config. Error browser dev console

I followed the Custom remote validators documentation
I have <script href="parsley.remote.js"></script> before <script href="parsley.js"></script> just before the end of html body and I'm seeing the following message on the console of Chrome Developer Tools:
Uncaught TypeError: Cannot read property 'on' of undefined(anonymous function) # parsley.remote.js:267(anonymous function) # parsley.remote.js:271
Part of paryley.remote.js code :
window.Parsley.on('form:submit', function () {
this._remoteCache = {};
});
On Firebug the error console message is
TypeError: window.Parsley is undefined
window.Parsley.on('form:submit', function () {
A small lab just a test html page with source dist js parsley
If I invert file reference parsley.remote.js and parsley.js, the error disappears, but according to the documentation, it's not the right way.
It's was bug, fixed in 2.1.3+.
Only include the remote version (assuming you need it).

Parse error while rendering the pdf file in angularjs app

When I try to access the pdf file which is public using the angular-pdf-viewer I got the following error message on console.
Error: [$parse:syntax] Syntax Error: Token ':' is an unexpected token at column 5 of the expression [http://pucdocket.s3.amazonaws.com/VA/PUE-2010-00039/122913.pdf] starting at [://pucdocket.s3.amazonaws.com/VA/PUE-2010-00039/122913.pdf].
here is my pdf directive for rendering the pdf file:
<pdf-viewer delegate-handle="my-pdf-container" url="http://pucdocket.s3.amazonaws.com/VA/PUE-2010-00039/122913.pdf" scale="1" show-toolbar="true" ></pdf-viewer>
could anyone help on this issue?
all the samples seems to be suggesting define url on scope and reference it. But you may try the following, which stringifys the url
<pdf-viewer delegate-handle="my-pdf-container" url="'http://pucdocket.s3.amazonaws.com/VA/PUE-2010-00039/122913.pdf'" scale="1" show-toolbar="true" ></pdf-viewer>

Resources