From 799e0f9dea608be28836083f894f93a3a9626c3e Mon Sep 17 00:00:00 2001 From: Paulo Castro Date: Wed, 16 Sep 2020 23:40:59 +0100 Subject: [PATCH] scan: Fix "CLI could not be loaded" with the standalone zip installer Change-type: patch --- package.json | 2 +- tests/test-data/pkg/expected-warnings-darwin.txt | 12 ++++++++++++ tests/test-data/pkg/expected-warnings-linux.txt | 12 ++++++++++++ tests/test-data/pkg/expected-warnings-win32.txt | 12 ++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 50aa4844..4be9b125 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "scripts": [ "build/**/*.js", "node_modules/balena-sdk/es2018/index.js", - "node_modules/balena-sync/build/sync/*.js", + "node_modules/balena-sync/build/**/*.js", "node_modules/pinejs-client-request/node_modules/pinejs-client-core/es2018/index.js", "node_modules/resin-compose-parse/build/schemas/*.json" ], diff --git a/tests/test-data/pkg/expected-warnings-darwin.txt b/tests/test-data/pkg/expected-warnings-darwin.txt index d0966c2a..834898df 100644 --- a/tests/test-data/pkg/expected-warnings-darwin.txt +++ b/tests/test-data/pkg/expected-warnings-darwin.txt @@ -1,3 +1,15 @@ +> Warning Cannot resolve 'module' + node_modules/balena-sync/build/index.js + Dynamic require may fail at run time, because the requested file + is unknown at compilation time and not included into executable. + Use a string literal as an argument for 'require', or leave it + as is and specify the resolved file name in 'scripts' option. +> Warning Cannot resolve ''./' + command' + node_modules/balena-sync/build/capitano/index.js + Dynamic require may fail at run time, because the requested file + is unknown at compilation time and not included into executable. + Use a string literal as an argument for 'require', or leave it + as is and specify the resolved file name in 'scripts' option. > Warning Cannot resolve ''./' + target' node_modules/balena-sync/build/sync/index.js Dynamic require may fail at run time, because the requested file diff --git a/tests/test-data/pkg/expected-warnings-linux.txt b/tests/test-data/pkg/expected-warnings-linux.txt index 461718da..8b7a5b0a 100644 --- a/tests/test-data/pkg/expected-warnings-linux.txt +++ b/tests/test-data/pkg/expected-warnings-linux.txt @@ -1,3 +1,15 @@ +> Warning Cannot resolve 'module' + node_modules/balena-sync/build/index.js + Dynamic require may fail at run time, because the requested file + is unknown at compilation time and not included into executable. + Use a string literal as an argument for 'require', or leave it + as is and specify the resolved file name in 'scripts' option. +> Warning Cannot resolve ''./' + command' + node_modules/balena-sync/build/capitano/index.js + Dynamic require may fail at run time, because the requested file + is unknown at compilation time and not included into executable. + Use a string literal as an argument for 'require', or leave it + as is and specify the resolved file name in 'scripts' option. > Warning Cannot resolve ''./' + target' node_modules/balena-sync/build/sync/index.js Dynamic require may fail at run time, because the requested file diff --git a/tests/test-data/pkg/expected-warnings-win32.txt b/tests/test-data/pkg/expected-warnings-win32.txt index 9b803f91..61de25fd 100644 --- a/tests/test-data/pkg/expected-warnings-win32.txt +++ b/tests/test-data/pkg/expected-warnings-win32.txt @@ -1,5 +1,17 @@ > Warning Cannot find module 'net-keepalive' from 'build\utils\device' %1: build\utils\device\api.js +> Warning Cannot resolve 'module' + node_modules\balena-sync\build\index.js + Dynamic require may fail at run time, because the requested file + is unknown at compilation time and not included into executable. + Use a string literal as an argument for 'require', or leave it + as is and specify the resolved file name in 'scripts' option. +> Warning Cannot resolve ''./' + command' + node_modules\balena-sync\build\capitano\index.js + Dynamic require may fail at run time, because the requested file + is unknown at compilation time and not included into executable. + Use a string literal as an argument for 'require', or leave it + as is and specify the resolved file name in 'scripts' option. > Warning Cannot resolve ''./' + target' node_modules\balena-sync\build\sync\index.js Dynamic require may fail at run time, because the requested file