Comments (20)
It should be possible now finally! :)
https://youtrack.jetbrains.com/issue/WEB-36734#focus=Comments-27-4463491.0-0
from envfile.
Support for the Node.js
configuration would be awesome!
from envfile.
As a workaround I currently use https://github.com/motdotla/dotenv
To do this, just run
npm i -D dotenv # short for npm install --save-dev
# or if you're using yarn
yarn add -D dotenv
Then add -r dotenv/config
to the Node parameters in the Run/Debug Configurations
window as seen in the picture. (-r
is short for --require
)
The other options are just needed for my TypeScript setup. You probably don't need this.
-r ts-node/register
is used to compile TypeScript "on the fly"
-r tsconfig-paths/register
loads TypeScript path aliases for Node.js
Edit:
Interestingly today it the debugger stopped working. It just didn't attach anymore. I had to remove the --inspect
flag from the Node arguments. (I also updated the screenshot)
from envfile.
I will use this ticket to track progress related to Node.js integration.
Regardless of an IDE (WebStorm, IDEA, PyCharm etc) under the cover all of them rely on the same plugin to provide support for Node.js run configurations.
Last time I checked the Node.js plugin was missing support for the standard plugin interface that EnvFile plugins requires (other language plugins support it). I will check the latest version of the plugin when I can and will post an update here. If it was added it should be straightforward to implement this. Otherwise I will ask everybody interested in this follow the example of #37 (comment) and request JetBrains to add the required plugin interface to Node.js - as seen in referenced comment they reacted to similar request within few months in the past.
from envfile.
+1, this would be a great addition for this plugin
from envfile.
No promises at this time since there is no guarantees it can be done (it always depends on the way how the run configuration is implemented in the platform) but I'll take a look and will let you know!
from envfile.
I recall looking at it... And on one hand I didn't find what I was looking for but on the other hand I didn't find a proof that this cannot be done. I'll try to find some time for it. OTOH, I just got in touch with JetBrains and I want to talk them into either adding required interfaces or incorporating plugin functionality into the IDE on its own.
from envfile.
@mlsquires there is nothing that can be done about it until https://youtrack.jetbrains.com/issue/WEB-36734 is addressed - please upvote the linked issue to help it happen sooner.
from envfile.
Any updates on this?
from envfile.
What exact run configurations you would like to have supported?
from envfile.
Thanks!
from envfile.
Hey @ashald - did this seem feasible? it would be a great feature for node
from envfile.
Any update on support Webstorm
from envfile.
@ashald Any updates concerning this request?
from envfile.
Last time I checked it was still the same. I'd suggest following an example of #37 and filing an issue for JetBrains as was done in #37 (comment)
from envfile.
Hi @ashald Asking again, as our team would also be very happy to make use of EnvFile for node.js applications, how can we help or what would be missing to have access to the plugin?
Would it also be possible (if not easier?) to have it in Goland when installing the node.js plugin?
Thanks a lot! :)
from envfile.
If I recall correctly, last time I checked the node.js plugin it was not compatible with plugin APIs used for integration with other platforms so it was not possible to do that at all. But I will take another look.
from envfile.
Created https://youtrack.jetbrains.com/issue/WEB-36734 to support this issue.
from envfile.
I've been using the plugin in GoLand and RubyMine for quite awhile. I just started a Node project (using WebStorm) and I miss it.
BTW RafaelKr your workaround is working for me at the moment - thanks!
from envfile.
+1, would love to see this get updated. Just started to dip my toe in React and have been using this for Rails for years now.
from envfile.
Related Issues (20)
- EnvFile 3.4.1 crash HOT 4
- Error response from daemon: invalid environment variable: =::=::\ HOT 2
- Issues when using with IntelliJ 2023.1 HOT 19
- Allow Kubernetes yaml style
- Read access is allowed from inside read-action (or EDT) only HOT 3
- Does not work with custom defined files.
- New Release 3.4.2
- Causes ModuleNotFoundError error in PyCharm HOT 1
- Missing EnvFile tab in 2023.2.2 HOT 6
- $PROJECT_DIR$ is not working HOT 1
- Crash when starting a springboot application with a YAML env file
- Security vulnerability in apache commons-text v1.9 HOT 2
- When executable is ticked, please add an option to run it from the working dir configured in the run config
- command line to set envfile extension
- env file not loaded for Gradle run/debug configurations
- Support for all Macros
- Support for react native configurations HOT 1
- EnvFile not working in Kotlin Configurations
- With "Ignore missing files" option off no visible error is shown if the file is missing, all gradle commands fail silently HOT 1
- EnvFile configuration resets on restart for ScalaTest setups HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envfile.