How do I configure Intellij to allow node import assertions? - node.js

I have the following code...
It compiles and functions just fine with the --experimental-json-modules flag but it still shows the following error on the red tilda...
I am already configured to use ECMAScript6+ so what else do I need?

Import assertions proposal is supported since version 2021.3, see WEB-52552; please consider upgrading IDEA to the most recent version

Related

How to upgrade Sceneform's source code to androidx?

I am using androidStudio-4.1 version and there the sceneform plugin is deprecated. So I included a module from GitHub https://github.com/google-ar/sceneform-android-sdk and use the same steps as suggested on Github but getting an error at "import android.support.annotation.Nullable;" and another related import issue.
I understood that I need to upgrade Sceneform's source code to androidx but I do not know how to do this.
Please suggest me.
There is a fork of Sceneform which is currently being kept up to date and which already has this update to AndroidX included and tested:
https://github.com/thomasgorisse/sceneform-android-sdk
It might be useful to consider using this as you may get better support and a wider community of people to share information with if you do.
See also the thread which refers to this fork and some recent experience using Sceneform after the official depreciation of the origin library: https://github.com/google-ar/arcore-android-sdk/issues/1049
replace line "import android.support.annotation.Nullable;" with "import androidx.annotation.Nullable;" through-out folder files ('sceneformsrc', 'sceneformux').
Make sure that you only implement one sceneform inside build.gradle file.
Goto build --> Rebuild Project, the problem will be resolved

lxml library in AWS Lambda

I've included this library as a layer to my lambda function but when I go to test it I get the error: cannot import name 'etree' from 'lxml'
There are multiple posts about people having this issue and some say to that I need to build it to compile some c libraries. Most posts say to look for another file or folder name 'lxml' which I've verified is not the issue.
I'm able to run the same code I've deployed to my layer on my local linux workstation and it runs without an issue.
Turns out my lambda was running python version 3.8 and that version is not compatible with the version of lxml I am using 4.5.1. Changing the run time to 3.7 fixed the issue. Hope this helps someone.

Getting error when Python connects with RabbitMQ

I am trying to connect RabbitMQ from Python. Here is the below code I am using
connection = pika.SelectConnection(parameters, self.on_connection_open, self.on_open_error_callback,
stop_ioloop_on_close=False)
I setup the configuration in RabbitMQ and copied the same in Python code also. But when running it throws the below error.
TypeError: _ _init_ _() got an unexpected keyword argument 'stop_ioloop_on_close'
Can anyone help me to fix this issue. For your information, I am using the latest versions of all the softwares.
Thanks in advance!!
For this issue, need to downgrade pika version to 0.11.2 and the recent versions throwing this error.
The problem is that the argument was removed in version 1.0.0 because of this issue. You should lock down the requirements to always make sure a version older than 1.0 is installed.
e.g.
Add something like this to the requirements file of your project.
pika<1.0
In addition it's probably worth looking into having the code fixed, and then removing the version restriction.
If you don't want to downgrade your version you can just remove the stop_ioloop_on_close argument. Since the functionality should have remained the same (i.e. now it's no longer checking what to do on close, so it will keep running).
If you want do want to close the connection you can use the on_close_callback parameter to call connection.ioloop.stop() yourself if needed.

Spring-boot-devtools not restarted when change groovy-files

In my project I work with spring-boot and groovy. Also I using spring-boot-devtool. This is a good tool that helps me.
But, when I change groovy-files, server not restarted, I have to change other files
Like a IDE I use a IDEA. The project assembled and tested with the command
gradle bootRun
Has anyone experienced this and found a solution?
In my case pattern !?*.groovy was absent in Resource patterns in Compiler settings
Try with <CTRL+F9>
I am using Spring Boot 1.3.0-RELEASE with groovy only.
Maybe this auto-generated demo project may help you to compare what went wrong with your project, using Sring CLI (installed via SDKMAN):
run in command line: spring init --dependencies=devtools,web --type=gradle-project --language=groovy example
Import to IDEA
run gradle bootRun
change source and hit <CTRL+F9>

IntelliJ Idea 12 Unable To Resolve Express Methods

For some odd reason, I can't seem to have code completion with the "express" object in my node.js project. Here is a screen of it.
My OS is Windows 8 and I am using IntelliJ Idea 12.11. Perhaps I need to do some extra setup? Please let me know.
#CrazyCoder got it right, it is indeed a intellij bug, as of now still unpatched, guess we have to wait =( The URL is http://youtrack.jetbrains.com/issue/WEB-6667. In the meantime, I guess I will have to live with it.
if you are on IDEA 13, you will still not get the Express methods until you use the express typescript stub
go to Javascript Libraries > Downloads and switch the combobox at the top to Typescript community stubs then type express
you should see the stub, it's also here:
https://github.com/borisyankov/DefinitelyTyped/blob/master/express/express.d.ts
if you are on Java 1.7 and haven't disabled the SNI Support you will get a handshake alert and the download will fail, go to the directory where your IDEA.exe is located and add the following line to the idea.exe.vmoptions:
-Djsse.enableSNIExtension=false

Resources