why red 'Exclamation Mark' appears on project after installing puppeteer? - node.js

Whenever I install puppeteers in my netbeans project, A red Exclamation Mark appears on my project name which is actually representing error in 'install.js' (node Modules/puppeteers/install.js). How to resolve this?
Error

This error is shown as a return statement is normally only expected in functions (but actually also valid outside of them). Therefore, the netbeans syntax checker tells you that this is invalid code (although it is valid).
Most likely, you want Netbeans to ignore the node_modules folder, as bad code inside any of these modules should not be shown as an error in your project.

Related

mps grammar cells giving message "Error Missing Dependency on jetbrains.mps.lang.core"

I am following along Kolja Dummann's Heavy Meta (4) livestream on Youtube.
I am trying to use the grammar cells to wrap a binary expression. the projection looks like this
<default> editor for concept BinaryExpression
node cell layout:
projection: [> wrap % left % grammar.constant wrap % right % <]
grammar: rule: <derive from projection> (instance of CellModel_RefNode) (instance of GrammarConstantQueryCell) (instance of CellModel_RefNode)
inspected cell layout:
<choose cell model>
the grammar.constant constant text property is set to subconcept.conceptAlias.
Unfortunately, I am getting an error message in the editor for both the wrap cells that says:
Error Missing Dependency on jetbrains.mps.lang.core
When I rebuild the editor, the language or the project, it reports that the rebuild is successful, however, I am unable to get the expected behavior of the aliases (+,-,*,/) being recognized after I type a number in the sandbox project.
I have added the jetbrains.mps.lang.core to the editor, but it shows up greyed out, i.e. unused.
when earlier in the tutorial I used wrap on my number literal editor, the expected behavior happened even though I got the editor showed this same error message. so perhaps the error message is a red herring.
I am using
MPS 2020.2 (202.6397.948). (I had same issue in 2020.1)
the grammarcells from de.itemis.mps.extensions-2020.1.1477.e4af43c (I think - not sure how to check).
There is a quick fix action, "Add dummy component to fix dependency on jetbrains.mps.lang.core". You can execute it to fix the error.
You have to use JetBrains MPS 2021.2.1 - It works correctly.
I used grammar.wrap in 2032.3 - it didn't work correctly. You can build the language but changes are not applied to the model - there are still some troubles to use grammarcell language in the newest MPS version 2021.3.

Getting a strange error from winnt.h?

I'm trying to write an x2 camera driver for a Hamamatsu camera in Visual Studio 2015. The X2 driver template already has windows.h included as an external dependency, but when trying to include a necessary header file, it throws an error that windows.h is not included (along with 80 or so errors of function calls that therefore don't exist). But when I include windows.h, I think it's causing a double include and is throwing this error:
Severity: Error (active)
Code: none
Description: expected an identifier Project :x2camera
File: c:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um\winnt.h
Line: 524
I'm really new to working with Visual Studio projects - how can I include windows.h into the file so it can get the functions and declarations it needs without actually including it and causing a double inclusion? Like I said, it's in the "project dependencies" list, and I think it's being included in another file (but I'm having a hard time finding that).
Or is that not even my problem?
Any help is appreciated.
​No idea what the problem was but I somehow managed to get it to compile. I think it needed to be included elsewhere first, then built, then included where it needed to be... which doesn't make sense honestly but maybe it was an error with how the inclusion was functioning.
Either way, my question is now resolved, though the questions that now arise such as "why the heck did this work" are baffling.

Mvvmlight and Xamarin.iOS unable to find default ctor

I have a project that is running fine on Android and WinPhone 8. When I attempt to run on iOS, I've getting the following error
Microsoft.Practices.ServiceLocation.ActivationException: Cannot
register: No public constructor found in x
where x is whatever SimpleIoc.Default.Register<T, TU>(); the flow hits first. I've moved the code around (as suggested elsewhere) to ensure all of the platform specific SimpleIoc calls are made in ViewModelLocator.
I've added public default ctors in the classes that are complaining about the error (I have though set the PreferredConstructor to the original, not the newly added public ctor).
I have a feeling that this error is a false positive (something else is failing, but pointing at that code).
Using Xam.iOS via a build server (the code is coming from VS2015). Xcode is running the 8.3 emulators (it may need updating to allow for 8.4 testing)
It could be that the Linker is optimising away the constructor, if it thinks it's not used. Try setting the Linker Options to "Don't Link" and see if it does it again, or even new-up an instance of the class elsewhere so that the Linker knows that the constructor is used. You don't necessarily want to leave it that way, but if it eliminates the error, you'll at least know the reason.
The [Preserve] attribute did the trick for me.
Decorate constructor with it and keep your linker settings.
This attribute is part of the Microsoft.WindowsAzure.MobileServices namespace.

Has anyone been successful getting Joomla running under IIS/Phalanger?

Has anyone been successful getting Joomla running under IIS/Phalanger?
I have gone through the Phalanger 3.0 installation, followed the instructions on making Joomla a app that runs using the Phalanger compiler, but for some reason I get an error before the app even starts up:
Error: Class 'JLogEntry' not found in C:\inetpub\wwwroot\nfspv3\libraries\joomla\log\log.php on line 169, column 4.
I was running Joomla 2.5 on IIS/MySQL prior to installing Phalanger 3.0 so I am wondering if it's an issue with the Phalanger compiler not interpreting the PHP right? Would be good to know if anyone has Joomla working with Phalanger ok.
The error is telling you that the class JLogEntry hasn't been defined, yet it has been referenced by something the expects it to be defined. This means a dependency wasn't satisfied. Your log.php is dependant on a file that defines the JLogEntry class. The JLogEntry class is defined in entry.php according to this:
http://www.reference.joomlademo.de/nav.html?_classes/index.html
and this:
http://www.reference.joomlademo.de/nav.html?_classes/index.html
So for whatever reason you're not satisfying that dependency. If I was on your system I'd poke around for that file, check if it exists, is corrupt, correctly versioned, or otherwise prevented from being executed.
If you still suspect something is hinky with your Phalanger compiler then test it. Write a simple "hello world" and prove whether it works or not. Infact do it in the same file (after backing up the file) to prove whether it's executing. The compiler is working at some level or else it wouldn't be showing you error messages.
Edit:
According to #highcore the Phalanger 3.0 compiler fails to implement regular expressions in the way Joomla expects. Joomla relies on this to resolve the filenames it will include. Thus, entry.php is never included leaving JLogEntry undefined. The suggested work around is to avoid reg ex and split the file names.

Strange link error - LNK1224: Invalid Image Base

I'm having some real difficulties porting a really old Visual Studio 97 C++ project to Visual Studio 2010. Let me begin by first giving a little background on the errors I was getting immediately prior to this new LNK1224 error because they may be related, but I'm not sure.
Prior to my new error I was receiving this error:
error LNK2005: "void __cdecl operator delete(void *)" (??3#YAXPAX#Z) already defined in LIBCMT.lib(delete.obj) nafxcw.lib(afxmem.obj)
Through some digging I found that the reason for this error was because both the MFC and CRT libraries contain definitions for "new" and "delete" so they were colliding. Microsoft provides 2 solutions for this detailed in http://support.microsoft.com/kb/q148652/ . One of them was to make sure that in all your files you always include the MFC headers (afx stuff) first. Well there are about 100 files in this project and I just got tired of trying to find the files that were including resources in the wrong order. So I went with the other solution which is basically forcing libraries to load in a particular order. Basically you have to tell the compiler to ignore a particular library so that you can load it explicitly your self in the order that you choose. In my case, it was nafxcw.lib.
So under Project Properties --> Linker --> Input, I explicitly ignored nafxcw.lib and then explicitly included it at the front of the list.
So after doing this, my LNK2005 errors went away. But they were replaced with one single link error.
error LNK1224: invalid image base 0x287600000
I don't know if I fixed my previous link errors correctly and this new link error is in fact the next thing I have to deal with, or I simply created a more critical link error that is basically stopping the linking process before it gets to my original LNK2005 errors. In either case, there isn't much information I could find on this error. Microsoft doesn't say much in this link about it http://msdn.microsoft.com/en-us/library/3ya3f8wz%28v=vs.80%29.aspx
You specified an invalid base address for the image. Base addresses must be 64KB aligned (the last four hex digits must be zero) and image base must fit within a 32-bit signed or unsigned value.
This isn't all that helpful to me and there seems to be no other clues as to where this problem is coming from. I don't know what the next step is.
OK, so it looks like I have solved my own problem. Here is what I did. I needed to know where the heck this number was coming from so I simply used Notepad++ to do a word search through all the project files looking for "2876" which I got from the error message "LINK : fatal error LNK1224: invalid image base 0x287600000". I found that in the project file (.vcxproj) had the following entry in it:
<BaseAddress>0x287600000</BaseAddress>
So I opened it up and sat there wondering how this number was wrong. I mean I don't even know what this field is for. I didn't even generate this file, M$ made it. Why would the IDE create it's own input file incorrectly? Anyways, as I was trying to google this "BaseAddress" item to figure out what it was, it dawned on me that it looked like there were too many zero's. So I went back and counted and sure enough, this wasn't a 32-bit number, it was a 36-bit number. Deleted one of the zero's, recompiled, and boom it worked. Low and behold, that's kind of what the defintion I looked up, mentioned in the problem statement, hinted at looked up earlier on MSDN but it didn't click.
I don't make a habit to rummage through auto generated files very often so I never questioned that this may be the problem.

Resources