Pārlūkot izejas kodu

Adding a catch for npm in which function (#3317)

* Adding a catch for npm in which function

* Updating based on request from blink
Alex Reichenbach 7 gadi atpakaļ
vecāks
revīzija
e601305281
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      jupyterlab/jlpmapp.py

+ 2 - 2
jupyterlab/jlpmapp.py

@@ -54,8 +54,8 @@ def which(command, env=None):
     path = env.get('PATH') or os.defpath
     path = env.get('PATH') or os.defpath
     command_with_path = _which(command, path=path)
     command_with_path = _which(command, path=path)
     if command_with_path is None:
     if command_with_path is None:
-        if command == 'node':
-            msg = 'Please install nodejs using conda or the nodejs website'
+        if command in ['node', 'npm']:
+            msg = 'Please install nodejs and npm before continuing installation. nodejs may be installed using conda or directly from the website.'
             raise ValueError(msg)
             raise ValueError(msg)
         raise ValueError('The command was not found or was not ' +
         raise ValueError('The command was not found or was not ' +
                 'executable: %s.' % command)
                 'executable: %s.' % command)