You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There may be commands of the @criticalmanufcturing/cli that may block, stating that an NPM package needs to be installed, but nothing then happens.
This usually occurs when an npx command is called and the package is not in the cache. In that case, the npx command prompts if the user authorizes the installation, but as the CLI standard input is not linked to the command input, the application stays blocked.
To ensure this is in fact the case, run the @criticalmanufacturing/cli command with debug active:
cmf -l Debug <command_args>
Then, check on standard output that in fact npx command is being called and that it is requesting a package to be installed and that the command is then blocked.
Steps to reproduce the issue
Clear your npx cache, by deleting the corresponding directory:
npx --yes clear-npx-cache
Init a new MES customization project, using cmf init command.
Create a new UI/HTML package layer, using cmf -l Debug new html
You will see that your console will be blocked on first attempt to run an npx @angular/cli command.
Workaround
To work around the issue in this situation, while a fix is not ready, you should run the npx command with the --yes option to install the package with no prompt:
npx --yes @package_to_install[@version]
Then re-run the cmf command. It should then be able to proceed, when previously it was blocked.
Possible fixes
Below are some possible solutions to fix this issue:
Add the --yes flag to npx commands to force the installation of the packages without prompting the user. We need to ensure it does not affect @criticalmanufacturing/cli behaviour if NPM v10 prior versions are in use.
Redirect console.input to npx commands so the user can accept the package installation and unblock npx execution.
The text was updated successfully, but these errors were encountered:
Description
There may be commands of the @criticalmanufcturing/cli that may block, stating that an NPM package needs to be installed, but nothing then happens.
This usually occurs when an
npx
command is called and the package is not in the cache. In that case, thenpx
command prompts if the user authorizes the installation, but as the CLI standard input is not linked to the command input, the application stays blocked.To ensure this is in fact the case, run the
@criticalmanufacturing/cli
command with debug active:Then, check on standard output that in fact npx command is being called and that it is requesting a package to be installed and that the command is then blocked.
Steps to reproduce the issue
Clear your npx cache, by deleting the corresponding directory:
Init a new MES customization project, using
cmf init
command.Create a new UI/HTML package layer, using
cmf -l Debug new html
You will see that your console will be blocked on first attempt to run an
npx @angular/cli
command.Workaround
To work around the issue in this situation, while a fix is not ready, you should run the npx command with the --yes option to install the package with no prompt:
Then re-run the
cmf
command. It should then be able to proceed, when previously it was blocked.Possible fixes
Below are some possible solutions to fix this issue:
--yes
flag tonpx
commands to force the installation of the packages without prompting the user. We need to ensure it does not affect @criticalmanufacturing/cli behaviour if NPM v10 prior versions are in use.console.input
tonpx
commands so the user can accept the package installation and unblocknpx
execution.The text was updated successfully, but these errors were encountered: