Webstorm cannot recognize node Express both on Windows and Ubuntu - node.js

environment:
Webstorm v10.0.4
Node.js v0.12.5
Windows 8.1
Ubuntu 14.04
Just as the image showing below, on the pannel of creating 'Node.js Express App', Webstorm only finds Node and npm, but can not recognize Express.
Of course Express is installed globally, and I can create a Express project via express-generator on terminal.
➜ ~ npm -g list -depth=0
/usr/local/lib
├── bower#1.4.1
├── cheerio#0.19.0
├── express#4.13.0
├── express-generator#4.12.4
├── npm#2.11.2
└── nrm#0.2.5
And the idea.log as follow, not detail messages:
[ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
[ 93] INFO - #com.intellij.idea.Main - IDE: WebStorm (build #WS-141.1550, 12 Jun 2015 00:00)
[ 93] INFO - #com.intellij.idea.Main - OS: Windows 8 (6.2, x86)
[ 93] INFO - #com.intellij.idea.Main - JRE: 1.8.0_40-b26 (Oracle Corporation)
[ 93] INFO - #com.intellij.idea.Main - JVM: 25.40-b25 (Java HotSpot(TM) Server VM)
[ 109] INFO - #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=150m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djb.vmOptions=D:\WebStorm 10.0.4\bin\WebStorm.exe.vmoptions -Xbootclasspath/a:D:\WebStorm 10.0.4\lib\boot.jar -Didea.platform.prefix=WebStorm -Didea.no.jre.check=true -Didea.paths.selector=WebStorm10
[ 281] INFO - #com.intellij.idea.Main - JNA library loaded (32-bit) in 172 ms
[ 296] INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational
[ 328] INFO - #com.intellij.idea.Main - Using "FocusKiller" library to prevent focus stealing.
[ 1920] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor js-nashorn-support.xml
[ 3094] INFO - llij.ide.plugins.PluginManager - 48 plugins initialized in 1909 ms
[ 3110] INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: ASP (0.1), AngularJS (141.1550), CSS Support, CVS Integration (11), CoffeeScript (2.0), Cucumber.js (141.1550), Dart (141.1550), EJS (141.1550), EditorConfig (1.0), File Watchers (141.1550), Gherkin (999.999), Git Integration (8.1), GitHub, HAML, HTML Tools (2.0), Handlebars/Mustache (141.1550), IDEA CORE, IntelliLang (8.0), JSTestDriver Plugin (141.1550), Jade (141.1550), Java Server Pages Integration (1.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), Karma (141.1550), LESS support, LiveEdit (999.0), Meteor (141.1550), NodeJS (141.1550), Perforce Integration (2.0), PhoneGap/Cordova Plugin (141.1550), Polymer & Web Components (141.1550), QuirksMode, REST Client, Refactor-X (2.01), Remote Hosts Access (0.1), SASS support, Spy-js (141.1550), Stylus support (141.1550), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TextMate bundles support (VERSION), W3C Validators (2.0), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML, hg4idea (10.0)
[ 4391] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=498008064
[ 4469] INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: D:\WebStorm 10.0.4\bin\fsnotifier.exe
[ 4516] INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational.
[ 5474] INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: []
[ 6709] INFO - rains.ide.BuiltInServerManager - built-in server started, port 63343
[ 8931] INFO - pl.stores.ApplicationStoreImpl - 77 application components initialized in 5758 ms
[ 8965] INFO - .intellij.idea.IdeaApplication - App initialization took 10956 ms
[ 9614] INFO - ellij.project.impl.ProjectImpl - 16 project components initialized in 258 ms
[ 9614] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
[ 17941] INFO - odejs.packages.NodePackageUtil - Loading node package info for express-generator ...
[ 20427] INFO - odejs.packages.NodePackageUtil - Info for express-generator node package loaded successfully in 2478.9 ms
[ 21655] INFO - odejs.packages.NodePackageUtil - Loading node package info for express-generator ...
[ 22243] INFO - odejs.packages.NodePackageUtil - Info for express-generator node package loaded successfully in 577.0 ms
This problem is occured both on Ubuntu and Windows.
Your help is appreciated!
Updated:
Just as shown below, I use nrm to select the fastest npm mirror -- taobao, and Webstorm goes wrong with it. When changed back to npm' main repository,Webstormcan fetchexpress-generator` info, and everything is OK. Strange!
C:\Users\honghe>nrm ls
npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
* taobao - http://registry.npm.taobao.org/
edunpm - http://registry.enpmjs.org/
eu ----- http://registry.npmjs.eu/
au ----- http://registry.npmjs.org.au/
sl ----- http://npm.strongloop.com/
nj ----- https://registry.nodejitsu.com/
pt ----- http://registry.npmjs.pt/
C:\Users\honghe>nrm test
npm ---- 1646ms
cnpm --- 1275ms
* taobao - 4388ms
edunpm - 994ms
eu ----- 2422ms
au ----- 1040ms
sl ----- 1369ms
nj ----- 2176ms
pt ----- Fetch Error

Initially, WebStorm installs specified version of express-generator package in temporary directory. Then WebStorm uses it to generate a new Express project. WebStorm doesn't use already installed express or express-generator packages.
BTW, express-generator always installs express package locally to a new project, so already installed express packages cannot be reused anyway.
According to the screenshot, the problem is that Version: Unavailable (version of express-generator). The cause should be specified at the bottom of the dialog, below CSS combobox. Not sure, but probably, it might be caused by the lack of the Internet connection. More detailed error description can be found in idea.log (on the main menu "Help | Show Log in Explorer").

I stumbled on this question while looking for a resolution. Mine was a syntax error in the 'package.json' file. Either in the main project directory or the node install within Program Files. The IDE doesn't flag the error, it just states that its 'Unavailible'.
To resolve this do the following, open CMD - within the folder for the node instalation, Delete the package.json along with the node_modules folder. (Ensure the non default ones are backed up so you can get them back) Then run:
npm init
This will intialise npm and restore the default packages and package.json. This will in turn restore express-generator.

Related

Error when installing apk on emulator in WebStorm but not in Android Studio

I want to develop a React Native app in WebStorm. Therefore I created my emulator in Android Studio which I use in WebStorm as an external tool. If I start it in WebStorm I get:
INFO | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
emulator: INFO: Found systemPath C:\Users\aerith\AppData\Local\Android\Sdk\system-images\android-33\google_apis\x86_64\
INFO | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
INFO | IPv4 server found: 172.17.0.11
INFO | added library vulkan-1.dll
INFO | configAndStartRenderer: setting vsync to 60 hz
INFO | injectedQemuChannel!
INFO | Informing listeners of injection.
INFO | Rootcanal has been activated.
WHPX on Windows 10.0.19044 detected.
Windows Hypervisor Platform accelerator is operational
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
INFO | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
INFO | Advertising in: C:\Users\aerith\AppData\Local\Temp\avd\running\pid_18624.ini
INFO | setDisplayConfigs w 1080 h 2400 dpiX 420 dpiY 420
It also starts successfully. However if I want to install an apk (I can install it on the same emulator in Android Studio) I get this error:
Unable to read the given APK.
Ensure that the file is readable.
Any ideas where the problem could be?

Android Studio: Read timed out for "dl.google.com"

I currently cannot setup my Android Studio since it seems not to be able to download packages from google, particularly from "https://dl.google.com/...".
Details:
Updating the IDE, download SDKs, etc. does not work and ends in a "Read timed out" error
According to the idea.log file, it looks like this
2022-12-30 08:19:42,842 [ 132503] INFO - er.configure.SourcesTableModel - Downloading https://dl.google.com/android/repository/addons_list-5.xml
2022-12-30 08:19:43,143 [ 132804] INFO - s.RepoProgressIndicatorAdapter - Downloading https://dl.google.com/android/repository/addons_list-5.xml
2022-12-30 08:21:02,106 [ 211767] INFO - er.configure.SourcesTableModel - IOException: https://dl.google.com/android/repository/addons_list-5.xml
2022-12-30 08:21:02,106 [ 211767] INFO - er.configure.SourcesTableModel - java.net.SocketTimeoutException: Read timed out
2022-12-30 08:21:02,417 [ 212078] INFO - s.RepoProgressIndicatorAdapter - IOException: https://dl.google.com/android/repository/addons_list-5.xml
2022-12-30 08:21:02,418 [ 212079] INFO - s.RepoProgressIndicatorAdapter - java.net.SocketTimeoutException: Read timed out
The file IS accessible from within my regular browser
I do not require any proxy, nor there is any proxy set up in my network setup
If I go to Setting > Appearance & Behavior > System Settings > HTTP Proxy and do "Check Connection"
it perfectly works for "https://www.google.com"
but it does NOT work for "https://dl.google.com"
Does anyone have an idea what that could be? Android Studio behaves as if it would deal differently with this domain AND/OR "dl.google.com" acts differently for the built-in HTTPS client in contrast to a regular browser.
I tried
Uninstalling/Reinstalling various versions of Android Studio (-> same issue)
I also made sure that there are no leftovers of any configuration between the different versions
I also removed anything that has to do with gradle
Accessing the domain from within different browsers (-> no issue at all)
Deactivated the Windows firewall (-> same issue)
Started Android Studio with administrator privileges

Error: Platform 'nodejs' version '14.17.1' is unsupported

I am trying to deploy Angular application to Azure. I created a static web app in Azure, and connected it to my Github main branch. When I run the action to deploy the app, I am getting an error in Build and Deploy action as Platform 'nodejs' version '14.17.1' is unsupported.
Here is the snippet of the error message:
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.[20](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:21)220401.1, Commit: afed4f696a08bfd4c8e4109704a082bf9fb20515, ReleaseTagName: 20220401.1
Build Operation ID: |ZIeL+T275t4=.afcbd56a_
Repository Commit : 848b07de657ce2303e1469a882d68999bed7925a
Detecting platforms...
Error: Platform 'nodejs' version '14.17.1' is unsupported. Supported versions: 10.1.0, 10.10.0, 10.12.0, 10.14.2, 10.16.3, 10.18.0, 10.18.1, 10.19.0, 10.20.0, 10.20.1, 10.[21](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:22).0, 10.[22](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:23).0, 10.22.1, 10.[23](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:24).0, 10.[24](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:25).1, 12.11.0, 12.11.1, 12.12.0, 12.13.0, 12.14.0, 12.14.1, 12.16.0, 12.16.1, 12.16.2, 12.16.3, 12.18.0, 12.18.1, 12.18.2, 12.18.3, 12.18.4, 12.19.0, 12.20.0, 12.21.0, 12.22.0, 12.22.11, 12.22.4, 12.22.6, 12.22.9, 12.9.1, 13.9.0, 14.0.0, 14.1.0, 14.10.0, 14.10.1, 14.11.0, 14.12.0, 14.13.0, 14.13.1, 14.14.0, 14.15.0, 14.15.1, 14.16.0, 14.17.0, 14.17.4, 14.17.6, 14.18.3, 14.19.1, 14.2.0, 14.3.0, 14.4.0, 14.5.0, 14.6.0, 14.7.0, 14.8.0, 14.9.0, 15.0.0, 15.0.1, 15.1.0, 15.2.0, 15.2.1, 15.3.0, 16.13.1, 16.13.2, 16.14.0, 16.14.2, 16.5.0, 16.6.1, 16.8.0, 17.0.1, 17.1.0, 17.2.0, 17.3.1, 17.4.0, 17.5.0, 17.6.0, 4.4.7, 4.5.0, 4.8.0, 4.8.7, 4.9.0, 4.9.1, 6.10.3, 6.11.0, 6.11.5, 6.17.1, 6.2.2, 6.6.0, 6.9.3, 6.9.5, 8.0.0, 8.1.4, 8.11.2, 8.11.4, 8.12.0, 8.15.1, 8.16.1, 8.16.2, 8.17.0, 8.2.1, 8.8.1, 8.9.4, 9.4.0, 1.17.3, 1.18.0, 1.19.0, 1.19.1, 1.19.2, 1.20.0, 1.21.0, 1.21.1, 1.22.0, 1.22.1, 1.22.2, 1.22.4
---End of Oryx build logs---
Oryx has found build steps, but identified unsupported platform versions. Failing build.
I have tried to use setup-node action by following this link: https://github.com/actions/setup-node.
I edited the yml file, and added this:
steps:
- uses: actions/checkout#v2
- uses: actions/setup-node#v3 ### Added this line
with:
submodules: true
node-version: 16 ### Added this line
I have also looked at this issue: https://github.com/microsoft/Oryx/issues/650. But there is nothing that is helpful.
EDIT: I have also posted the question here https://github.com/microsoft/Oryx/issues/1504

Ionic2 serve not working

When i write ionic serve nothing opens. I have tried changing nodejs versions. Reinstalling ionic cordova. Also cleared cache and other ways on internet. Nothing works. Please help. No errors are shown but a window is not opened.
Info:
C:\Projects\cutePuppyPics>ionic info
cli packages: (C:\Users\Tullo\AppData\Roaming\npm\node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.1.4
Cordova Platforms : none
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.9.1
npm : 5.5.1
OS : Windows 10
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Serve:
C:\Projects\cutePuppyPics>ionic serve
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser -
Ctrl+C to cancel
[20:52:58] watch started ...
[20:52:58] build dev started ...
[20:52:58] clean started ...
[20:52:58] clean finished in 12 ms
[20:52:58] copy started ...
[20:52:58] deeplinks started ...
[20:52:58] deeplinks finished in 40 ms
[20:52:58] transpile started ...
[20:53:03] transpile finished in 5.17 s
[20:53:03] preprocess started ...
[20:53:04] preprocess finished in 4 ms
[20:53:04] webpack started ...
[20:53:04] copy finished in 5.44 s
[20:53:13] webpack finished in 9.14 s
[20:53:13] sass started ...
[20:53:14] sass finished in 1.68 s
[20:53:14] postprocess started ...
[20:53:14] postprocess finished in 16 ms
[20:53:14] lint started ...
[20:53:14] build dev finished in 16.32 s
[20:53:14] watch ready in 16.47 s`enter code here`
[20:53:14] dev server running: http://localhost:8100/
[OK] Development server running!
Local: http://localhost:8100
External: http://192.168.10.8:8100
DevApp: cutePuppyPics#8100 on LAPTOP-NNU75MUT
Sometimes the browser doesn't open automatically. Try entering http://localhost:8100 on your browser manually after ionic serve.
force an ip adresse
ionic serve --address YOUR_IP_ADDRESS
your ip adresse should be available , i think you can use 192.168.10.8 or 127.0.0.1

Intellij Idea 14 on Arch Linux opening to grey screen

I am trying to run Intellij Idea 14 on my Macbook which I have loaded with Arch Linux. I have installed both Idea and the Oracle JDK8 installed from AUR.
When I run idea.sh, the splashscreen shows up and after it finishes loading it opens to this screen.
Here is idea.log:
2015-10-29 17:02:33,298 [ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2015-10-29 17:02:33,312 [ 14] INFO - #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IC-141.2735.5, 22 Sep 2015 00:00)
2015-10-29 17:02:33,312 [ 14] INFO - #com.intellij.idea.Main - OS: Linux (4.2.3-1-arch, amd64)
2015-10-29 17:02:33,312 [ 14] INFO - #com.intellij.idea.Main - JRE: 1.8.0_66-b17 (Oracle Corporation)
2015-10-29 17:02:33,312 [ 14] INFO - #com.intellij.idea.Main - JVM: 25.66-b17 (Java HotSpot(TM) 64-Bit Server VM)
2015-10-29 17:02:33,314 [ 16] INFO - #com.intellij.idea.Main - JVM Args: -Xbootclasspath/a:./../lib/boot.jar -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=225m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Dawt.useSystemAAFontSettings=on -Djb.vmOptionsFile=./idea64.vmoptions -XX:ErrorFile=/home/noah/java_error_in_IDEA_%p.log -Djb.restart.code=88 -Didea.paths.selector=IdeaIC14 -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
2015-10-29 17:02:33,341 [ 43] INFO - #com.intellij.idea.Main - JNA library loaded (64-bit) in 27 ms
2015-10-29 17:02:33,424 [ 126] INFO - .intellij.idea.IdeaApplication - WM detected: bspwm
2015-10-29 17:02:34,174 [ 876] INFO - llij.ide.plugins.PluginManager - 29 plugins initialized in 612 ms
2015-10-29 17:02:34,174 [ 876] INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: Android Support (10.1.1.0), Ant Support (1.0), Bytecode Viewer (0.1), CVS Integration (11), Copyright (8.1), Coverage, Eclipse Integration (3.0), EditorConfig (1.0), Git Integration (8.1), GitHub, Gradle, Groovy (9.0), I18n for Java, IDEA CORE, IntelliLang (8.0), JUnit (1.0), Java Bytecode Decompiler (0.1), JavaFX (1.0), Maven Integration, Plugin DevKit (1.0), Properties Support, Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), UI Designer, XPathView + XSLT Support (4), XSLT-Debugger (1.4), hg4idea (10.0)
2015-10-29 17:02:34,790 [ 1492] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=739246080
2015-10-29 17:02:34,814 [ 1516] INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /usr/share/intellijidea-ce/bin/fsnotifier64
2015-10-29 17:02:34,822 [ 1524] INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational.
2015-10-29 17:02:35,539 [ 2241] INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: []
2015-10-29 17:02:35,977 [ 2679] INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342
2015-10-29 17:02:36,557 [ 3259] INFO - TestNG Runner - Create TestNG Template Configuration
2015-10-29 17:02:36,622 [ 3324] INFO - ellij.project.impl.ProjectImpl - 20 project components initialized in 409 ms
2015-10-29 17:02:36,622 [ 3324] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
2015-10-29 17:02:36,865 [ 3567] INFO - pl.stores.ApplicationStoreImpl - 83 application components initialized in 2621 ms
2015-10-29 17:02:36,870 [ 3572] INFO - .intellij.idea.IdeaApplication - App initialization took 4204 ms
2015-10-29 17:06:05,892 [ 212594] INFO - org.jetbrains.io.BuiltInServer - web server stopped
2015-10-29 17:06:05,893 [ 212595] INFO - Types.impl.FileTypeManagerImpl - FileTypeManager: 0 auto-detected files
Elapsed time on auto-detect: 0 ms
2015-10-29 17:06:05,907 [ 212609] INFO - dea.ddms.adb.AdbService$Ddmlib - DDMLib terminated
2015-10-29 17:06:05,907 [ 212609] INFO - il.indexing.FileBasedIndexImpl - START INDEX SHUTDOWN
2015-10-29 17:06:05,927 [ 212629] INFO - il.indexing.FileBasedIndexImpl - END INDEX SHUTDOWN
2015-10-29 17:06:05,927 [ 212629] INFO - stubs.SerializationManagerImpl - START StubSerializationManager SHUTDOWN
2015-10-29 17:06:05,927 [ 212629] INFO - stubs.SerializationManagerImpl - END StubSerializationManager SHUTDOWN
2015-10-29 17:06:06,002 [ 212704] WARN - api.vfs.impl.local.FileWatcher - Watcher terminated with exit code 0
2015-10-29 17:06:06,003 [ 212705] INFO - newvfs.persistent.PersistentFS - VFS dispose started
2015-10-29 17:06:06,003 [ 212705] INFO - newvfs.persistent.PersistentFS - VFS dispose completed
2015-10-29 17:06:06,007 [ 212709] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------
Any help would be greatly appreciated.
This is most likely due to your window manager, bspwm. If you set the following environment variable before starting IntelliJ, it should work.
_JAVA_AWT_WM_NONREPARENTING=1
As #thomas pointed out, the missing environment variable is causing this issue
Here're the steps to do that.
Copy this -> _JAVA_AWT_WM_NONREPARENTING=1
If you have nano installed:
Run sudo nano /etc/environment on terminal and enter the password if prompted
Scroll to the bottom
Paste by pressing Shift + Insert
Save by pressing Ctrl + O and confirm the path with Enter
Quit by pressing Ctrl + X
If you have vim installed:
Run sudo vim /etc/environment on terminal and enter the password if prompted
Scroll to the bottom
Enter insert mode by pressing i
Paste by pressing Shift + Insert
Exit the insert mode by pressing Esc
Save and exit by typing :wq and Enter
The error should be resolved. This is apparently documented along with Android Studio on the wiki

Resources