Browse Source

Fix node_modules removal

Steven Silvester 7 years ago
parent
commit
4ae3c78201
1 changed files with 2 additions and 1 deletions
  1. 2 1
      jupyterlab/commands.py

+ 2 - 1
jupyterlab/commands.py

@@ -222,7 +222,8 @@ def install_extension_async(extension, app_dir=None, logger=None, abort_callback
     # Remove any existing package from staging/node_modules to force
     # Remove any existing package from staging/node_modules to force
     # npm to re-install it from the tarball.
     # npm to re-install it from the tarball.
     target = pjoin(app_dir, 'staging', 'node_modules', data['name'])
     target = pjoin(app_dir, 'staging', 'node_modules', data['name'])
-    shutil.rmtree(target)
+    if os.path.exists(target):
+        shutil.rmtree(target)
 
 
 
 
 def link_package(path, app_dir=None, logger=None):
 def link_package(path, app_dir=None, logger=None):