![]() ![]() ![]() The following describes how to configure WebStorm for Local Generator Development and set it up for debugging. I am a big Node.js WebStorm fan, so I like to use this for all my JavaScript coding. Internally to IBM we are using the full range of Dev Ops tools from Travis, Jenkins, Ansible and IDE tools from XCode to IntelliJ and WebStorm, and for simple code editing Visual Studio code. This makes it very easy for a developer to then deploy this app into IBM Kubernetes support and have it managed with IBM Cloud Dev Ops service. For example github This generator adds Kubernetes, Helm Charts and Dev Ops configuration to a polyglot cloud native app. Check out the console.bluemix or console.bluemix So we have a cool Yeoman as a service microservice we can feed generators and out pops fully formed starter projects for working with IBM Cloud. The project I am working on for IBM Cloud is using a lot of Yeoman Generators to help scaffold out Cloud native projects for server side runtimes include Node, Swift, Java and Python, and its helping configure content like Helm charts and Kubernetes configurations.Īt IBM we have worked out that putting stuff in Git is just setting up a maintenance issue, in the fast moving world of Cloud native runtimes and frameworks, and compute platforms, anything dropped into a git repo is going stale withing weeks. After some googling I found a few comments that helped, but nothing that gave the full detail. The first challenge for me at the end of 2017 is around setting up WebStorm to debug your own custom yeomanYeoman Generators. This will mostely be about software but could include DIY or Parenthood. node-supervisor.Part of my mission this year is to document all the things I have struggled to find help with on the internet, and I have subsequently found a solution. The same trick might have to be used with some of the tools similar to nodemon, e.g. Using these settings, nodemon works fine when run from a WebStorm Run Configuration. The fix for this is to specify the location to the node executable using the -exec /usr/local/bin/node parameter. The error seems to be caused by WebStorm not seeing the node executable on its path. The -exec part is important, as the execution will fail with the following error: /usr/local/bin/node /usr/local/bin/nodemon server.jsĤ Oct 13:56:50 - to restart at any time, enter `rs`Ĥ Oct 13:56:50 - watching: /Users/foo/testĤ Oct 13:56:50 - starting `node server.js`Ĥ Oct 13:56:50 - exception in nodemon killing nodeĪt errnoException (child_process.js:980:11)Īt Process.ChildProcess._handle.onexit (child_process.js:771:34) This will instruct the node interpreter to execute the nodemon script using the following command line: node /usr/local/bin/nodemon -exec /usr/local/bin/node server.js. ![]() ![]() Node parameters: /usr/local/bin/nodemon -exec /usr/local/bin/node.Then, in your WebStorm Run Configuration, add the following, leaving everything else unchanged: This will install nodemon globally on your machine. To install nodemon, use the following (if required, use sudo to run the installation with root privileges: npm install -g nodemon You should save the debug/run config to file so your teammates can also easily debug/run your nodejs app like you Then from Webstorm 's run/debug config, set Node parameters to be :path_to_project_dir/node_modules/.bin/nodemon You may NOT have nodemon exists from which nodemon command, then you should have it in your package.json ie nodemon be installed at :project_dir/node_modules/.bin/nodemon usr/local/bin/nodemon) under "Node Clark, thanks for confirming. It looks like the workaround with -exec isn't necessary anymore, at least when using the newest version of nodemon and Webstorm 7 or 8.Īll you have to do is specify your path to nodemon by obtaining its path with running which nodemon in your console (e.g. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |