I am a complete newbee to web development, and now I am facing a problem that I do not know how to deal with.
I am using the npm package named #uniprank/ngx-file-uploader (https://www.npmjs.com/package/#uniprank/ngx-file-uploader) in my web application, which is developed in Typescript with Angular 4. When compiling it with JIT compilation it works with no problems. However, now I would like to turn my application to production mode, so I tried AOT compilation. When I try to compile my application with the Angular compiler, as it is shown here: https://angular.io/guide/aot-compiler. The message shown is the following:
Unexpected value 'undefined' exported by the module 'FileUploaderModule in /node_modules/#uniprank/ngx-file-uploader/typings/index.d.ts'
I am completely lost at this point. Although I have been looking around in the web, I cannot figure out what means that message and how to fix it.
Any ideas to solve this problem will be appreciated. Thanks.
Related
I recently faced the task of converting a fairly mature angular project to SSR because I had overestimated the search power of SEO in angular projects. I'm not familiar with node, my angular project is on an apache server and uses php(slim) as the backend api, however, when I started trying to use "most of the tutorials", i.e., the first step, introducing nguniversal/express-engine into the project, it went well, npm did not report any errors.
Then I tried to run npm run build:ssr and it also worked fine. The problem is that when I run npm run serve:ssr, it ends up throwing a "ReferenceError: navigator is not defined" error...
Earlier, I built a completely clean angular project for testing, from build:ssr to run serve:ssr. Even I specified node xxxx/xxxx/main.js directly, no problem, which is obvious, because the angular project for testing is absolutely clean.
However, this does not work on my current "existing angular project". Yes, I fully understand that SSR doesn't allow for navigator or most so-called DOM manipulation, and although I'm not familiar with angular universal yet, I've previewed it and I know that's not possible, but here's the biggest problem :
In this existing angular project, there is no any navigator operations, not even a single line of code
In fact, main.js is also generated automatically, I can't stop it at all, I don't understand why there is "navigator" written in main.js?
I've checked many so-called solutions, including writing something in server.ts, but nothing helps, how can I continue? This is really quite desperate!
Big thank any help!
I'm having errors on my networked-aframe project. I can edit it on Glitch, but when press ‘Show’ it shows : failed to start application on ilearn-official.glitch.me This is most likely because your project has a code error.Check your project logs, fix the error and try again.
As a newbie, I’m having a hard time finding and solving the error. Can anyone help? Here’s my glich code:https://glitch.com/edit/#!/ilearn-official
Taking a look at your Glitch app's package.json file, it looks like you're using Node 6.9.x which is wildly out of date and probably at odds with some of the Node your app has in it. If you update the engine to Node 14.x, that should help with that particular error.
I am using Angular 10 in my Electron app and after building a release version of my app I see the following errors below in the Chrome Inspector. Unfortunately I have no idea if it comes from Electron or Angular, or what it even tries to tell me. The non-production build just runs fine without the error.
Unfortunately I can't really see the stacktrace. Does anyone know what it is, or has a good approach how to pinpoint the cause of it? Thanks!
You can click on the arrow next to 'k'. It gives you a more detailed info about the error and what might have happened.
looked for couple of hours, on how to solve that, but no luck.
I am using VS 2017 preview edition, and trying to open ASP.NET core 2.0 web application, that uses Angular template
when i open the site (f5 or ctrl-f5), the web-browser getting opened with the message
Cannot GET /
I don't know what causing that and how to fix that, tried to clean/rebuild/restart VS/change project port number/restart the computer, what else can I do to solve that?
Depending on what error you have in the client application, the server might not start at all. Local errors like undeclared locals are seldom a problem.
Usually, the web server does not start when a dependency of the module marked as bootstrap is missing, like, for example `entryComponents'.
Another thing that can cause the boostrap to fail, is a missing file: in this case you should have a look at templateUrl and styleUrls.
Manually compiling via ng build (or better ng build --prod) will point you to the offending code.
I'm using Electron to build a native application, based on existing code (developed with Electron v0.26.1). I'd like to use features available on more recent versions of Electron, so I changed the version number in package.json to v0.36.9 (the most recent one so far) and reinstalled its dependencies.
Now, I fully expected the applicaton to break when running npm start, and indeed it does, but I didn't expect the error message to be so uninformative:
Error opening app
The app provided is not a valid Electron app, please read the docs on how to write one:
https://github.com/atom/electron/tree/v0.36.9/docs
Error: Cannot find module '/home/user/electron/myapp/build'
I'd appreciate if it would say why it is no longer a valid Electron app, give any sort of stack trace, or file causing the issue.
Running npm start did create a build directory like before, which contains several files, just like before the upgrade. From the way it's worded, I cannot know if the Cannot find module message is the cause of the error, or the consequence. And if it is the cause, I have no idea of who or what is requiring such module, since before the upgrade this had never happened.
I tried "standard" debugging techniques, like running npm start --debug (the flag exists, but is not useful in this situation), npm rebuild, reading the Electron FAQ, looking for any *.log files (none to be found), and looking for occurrences of require('build') or something similar (no such occurrences). Nothing helped.
How can I get any information at all about why this is failing? Every programming language/build system I know of would at least output the source file where the error occurred, and possibly more information.
In your app's package.json there probably something like:
"scripts": {
"start": "electron /home/user/electron/myapp/build"
}
That's the command that will be executed when you run npm start, so fix the path in there to point to the .js file that contains your app entry point.
Well, after bisecting changes here and there, and following Vadim Macagon's advice to look further into package.json, I found out that the following change was responsible for the complete failure:
Changing "fs-jetpack": "^0.6.4" to "fs-jetpack": "^0.7.1"
Now, unfortunately I still have absolutely no idea about why that happened, or how I could have possibly found it out other than blindingly changing settings here and there.
This is not the answer to my question (I'd still like helpful information about how to debug Electron apps to avoid similar problems in the future), but it does allow me to keep working. That is, if I decide to keep using Electron, which I'm no longer sure it's a good idea.
Edit: There is at least one related issue on Github, but it has been closed and the issue has not been resolved.