How do I correctly work with multiple dependent packages in IntelliJ IDEA? - intellij-idea

I've got three packages in my project.
Two of the packages I'm working on are dependencies for the 'main' package.
These two are installed in development mode within the project's virtual env (by the pip install -e).
They are imported as modules in the IntelliJ IDEA project (currently highlighted as 'non-project files' in yellow).
My questions:
What is the correct way of setting it up?
Why are the packages in the venv showing as non-project files?
Thank you

Related

Why doesn't my Intellij Ultimate detect virtualenv?

I've opened a Python project from IntelliJ Utlimate 2019.2.5 after using Pycharm.
I've the IDEA to a newly created virtualenv project SDK under <root>/.virtualenv directory, however, I cannot run pip install on the requirements using the terminal because virtualenv is not working, and I'm using my global python installation.
Opening the same project back in Pycharm brings it back to life again.
Is there a specific configuration I've missed (though I doubt that because there are only these instructions).
It's not possible at the moment in IntelliJ IDEA.
Vote for https://youtrack.jetbrains.com/issue/PY-22067

Adding .jar Files in Visual Studio Code

First and foremost, I really appreciate your help. I am trying to build an application by using an external library Apachi Poi. I know I need to add jar files to the project; however, I don't know how I should do that plus I have been searching on the Internet for a solution, but I could not find one even I checked this. My OS is Linux and I am running 1.33.1 version of VSCode.
[UPDATE]: I have fixed my problem. What I basically did was to install maven command to my
Linux machine and now I am using mvn command along with pom.xml to add my .jar files to
the project.

Typescript: Yarn Workspaces IDE Support (IntelliJ, VSCode ...)

Working on a larger typescript project we decided to move the code to a monorepo with yarn workspaces.
We use webpack to build and bundle and everything works well (especially the linking between local modules/packages).
Since yarn workspaces will store most of the node_modules in the mono repo's root folder, the IDE (IntelliJ as well as VSCode) have problems resolving the imports to any node_modules when coding inside a "inner" project (so called "package" of a monorepo).
The strange thing is that imports are not known but on the other hand most of the time you can navigate to the correct source / definition within the IDEs for the same import if you write it down manually.
We have tried to tell IntelliJ to look into another folder for node_modules, but still not satisfying.
Please share your experience with yarn workspaces / monorepo (e.g. lerna) and how you develop the code living in these monorepos.
Which IDE do you use?
Did you add any special configurations to the IDE and/or package.json, tsconfig.json?
https://github.com/Izhaki/mono.ts
It uses yarn workspaces and marry well with VSCode. I hope the README is clear enough.
Basically, use two (parallel) typescript configuration trees:
Pre-build - uses aliases (for VSCode, tests, webpack, etc).
Build - uses typescript 3 project references for publishing essentially.
IDEA doesn't provide any support for Yarn workspaces; if you miss it, please follow WEB-29250 and linked tickets for updates.
You can try adding path mappings to your tsconfig.json - see https://intellij-support.jetbrains.com/hc/en-us/community/posts/207656825/comments/115000529564
Upodate as of 2018.1.1 IntelliJ now supports yarn workspaces so if you use this there should not be a problem.
https://blog.jetbrains.com/webstorm/2018/04/webstorm-2018-1-1/
Please share your experience with yarn workspaces / monorepo (e.g. lerna) and how you develop the code living in these monorepos.
Which IDE do you use?
Since you are asking. I basically ran into the same issues as you did. One solution I was looking into was disable hoisting node modules as described here. Unfortunately it seems it is not yet in the stable release.
What I ended up was ditiching workspaces for now until they fix either the IDE or release the nohoist option. Instead I am using lerna for now. It is less convenient but it does not hoist so that both the build tools and the IDE are satisfied.
Oh, I am also using IntelliJ (ultimate)

Install webdriver globally or localy?

The manual states that
You can also install the package globally on your machine and use the
wdio directly from the command line. However it is recommended to
install it per project.
Why is that? What downfall should I worry if installing globally?
If you only wish to use webdriver only in your shell regardless of any project then you can install it globally. However, if you wish to use it in a project, such that it is required to run project tests then install it locally (in this case it should be devDependency). The reasons are:
1) When multiple people working on a project, it is ensured that all of them have the same versions of the required packages.
2) Portability. The project dependencies should be completely defined in package.json so that after running npm install the project is ready to use in every environment.
For people new to NPM and Node, I'd recommend a global install to keep it simple. There are reasons to install it locally though, mostly to do with version compatibility and ease of project sharing: https://www.joezimjs.com/javascript/no-more-global-npm-packages/

How do I install a plugin from a local .zip or .jar file in Aptana Studio 3?

I have a locally packaged plugin that isn't available from any update server (I built and exported it from source code, using Eclipse.) The plugin installs and works in the Eclipse environment.
Now I'd like to use it in my standalone Aptana Studio 3 installation. Is there a documented method of installing a .ZIP or .JAR file containing a working Eclipse plugin into Aptana Studio 3?
If this is well-documented elsewhere, a URL is all I need! :D
Edit: I realize there may be many reasons why the plugin doesn't work in Aptana; the issue here is that I can't find a simple way to install the plugin from within Aptana. I've tried "Add Repository -> Local" and "Add Repository -> Archive" but neither method recognizes the packaged plugin. I've also tried dropping the jar file into the Aptana 3 'plugins' dir and restarting -- no love. But there are no error messages or log entries to help understand why I can't install the plugin.
Might be a dependency issue. In some cases, a plugin may depend on another plugin that is missing from the product (e.g. Aptana Studio, in this case).
What I suggest is to install Aptana Studio as a plugin into a classic Eclipse 3.7 installation. Then, install your plugin just like you tried before.
Hope that helps.