diff libervia/server/tasks/implicit/task_js_modules.py @ 1434:2f6dac783c8e

tasks(js_modules, sass): remove support for `npm`: `npm` cause trouble during installation, and it will be resource cousuming to find the source and maintain it in addition to `yarn`, thus `yarn` is for now kept and the only supported NodeJS package manager.
author Goffi <goffi@goffi.org>
date Wed, 09 Jun 2021 16:50:07 +0200
parents 10748aa888a9
children 106bae41f5c8
line wrap: on
line diff
--- a/libervia/server/tasks/implicit/task_js_modules.py	Sun Jun 06 19:40:07 2021 +0200
+++ b/libervia/server/tasks/implicit/task_js_modules.py	Wed Jun 09 16:50:07 2021 +0200
@@ -16,7 +16,7 @@
 
     async def prepare(self):
         if "js" not in self.resource.browser_modules:
-            raise exceptions.CancelError(f"No JS module needed")
+            raise exceptions.CancelError("No JS module needed")
 
     async def start(self):
         js_data = self.resource.browser_modules['js']
@@ -25,7 +25,7 @@
         with package_path.open('w') as f:
             json.dump(package, f)
 
-        cmd = self.findCommand('yarnpkg', 'yarn', 'npm')
+        cmd = self.findCommand('yarnpkg', 'yarn')
         await self.runCommand(cmd, 'install', path=str(self.build_path))
 
         try: