Skip to main content
Installation errors
Zsombor Deak avatar
Written by Zsombor Deak
Updated over 4 months ago

Note (June 1, 2023):

We had an issues with our private npm registry on May 31, 2023 that has been fixed. New tokens will be needed since the private npm registry had to be rebuilt internally.

First thing’s first, the CLI: Make sure to have the Mobiscroll CLI installed. More info on it here - https://docs.mobiscroll.com/cli (make sure that you have at least Node.js 11 installed).

In case of NPM and Yarn 1: Call a mobiscroll login in your application root folder (use the email address and password of the licensed account) followed by pushing the .npmrc into your repository for CI/CD.

In case of Yarn 2+: Call mobiscroll logout followed by a mobiscroll config {framework} to install the latest version or specify the exact version like mobiscroll config {framework} --version 5.22.3. This will take care of refreshing the tokens after which you can push the .yarnrc.yml into your repository for CI/CD.

Caching and checksum issues: Since the npm packages were rebuilt, the checksum of the packages changed and in some CI/CD environments this causes problems.

If that’s the case try deleting the package-lock.json (in case of NPM) or yarn.lock (in case of Yarn) files, and run npm install / yarn install again, and push the updated files to the repository.

In some cases, when using Yarn, running yarn cache clean --all is also necessary (locally and on the server).

If cleaning the cache does not work, try setting the YARN_CHECKSUM_BEHAVIOR=update env variable on the CI/CD environment.

1. npm ERR! 403 Forbidden

This error usually occurs when the Mobiscroll npm package couldn't authenticate. There can be multiple causes:

  • The user doesn't have access to the npm package

    The npm packages contains the full set of Mobiscroll controls. This error usually occurs when the user has a component license and tries to install using NPM.

    Solution: Download the package manually.

  • The package is used on a CI or AWS server, and the authentification token is missing

    Solution: an .npmrc file with the Mobiscroll auth tokens should be present in the project's root directory. The mobiscroll config cli command should generate this .npmrc file by default.
    If you don't have the .npmrc file in your project's root directory, check the following folder for a global .npmrc: $HOME/ on Mac and Linux and Users/{Username}/ on Windows. If the file exists, delete the Mobiscroll related auth tokens from it. After this you can re-run the mobiscroll config command in your project and push the newly generated file to your repo.
    Make sure the .npmrc file is under source control (is not ignored), and is present on the CI/CD environment.

  • If the Mobiscroll account's password was changed

    If you changed your account's password then previously generated Mobiscroll npm auth token won't be valid anymore.

    Solution: Delete the Mobiscroll related content form the .npmrc file, and run the mobiscroll config command once again.

2. npm login failed. URL is not defined

This error message usually occurs when you're using an older Node.js version. The CLI requires at least Node.js 11.

Solution: Please try to upgrade at least to Node.js 11.

3. npm login failed. Not Found

This error message usually occurs when your email address contains a specific character for example '+' . The NPM registry has some issue with this character.

Solution: You can use the account's username for the login and you can also change if you want from the accounts page https://mobiscroll.com/account.

4. User {username} has no access to package @mobscoll/{framework}

The npm packages contains the full set of Mobiscroll controls. This error usually occurs when the user has a component license and tries to install it using NPM. The error also occurs if the user doesn't have a license assigned.

Solution: Download the package manually.

5. Could not find user with the specified username or password

This error is thrown by the Mobiscroll NPM registry and as the error message indicates this might be either because you mistyped your login information or your account does not exist.

Solution:

6. Proxy related issues

If you're behind a proxy, the installation process might not be able to send the necessary requests. The following errors indicate that there's a problem with the proxy configuration:

  • Error: getaddrinfo ENOTFOUND npm.mobiscroll.com

  • Error: getaddrinfo EAI_AGAIN npm.mobiscroll.com

  • Error: connect ETIMEDOUT

  • Error: tunneling socket could not be estabilished

  • Error: socket hang up

Solution:

  • Set the http_proxy and the https_proxy environment variables.

  • If you do not want to add or modify the system environment variables, use the --proxy option to pass the proxy server address to the config command (replace your_user, your_password, your_proxy and the port 1234 with your actual proxy configuration)

    $ mobiscroll config [framework] --proxy http://your_user:your_password@your_proxy.com:1234

7. Certificate related issues

In certain environments, behind a strict firewall, the config may fail with one of the following errors:

  • Error: unable to get local issuer certificate

  • Error: self signed certificate in certificate chain

Solution:

  • Bypass the ssl verification by setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to 0. This should be used only as temporary solution, since this will bypass ssl verification for every request from Node.js, which is not secure.

    Linux/Mac

    $ export NODE_TLS_REJECT_UNAUTHORIZED=0

    Windows:

    $ set NODE_TLS_REJECT_UNAUTHORIZED=0

  • A permanent solution would be to set the certificate file using the NODE_EXTRA_CA_CERTS environment variable. Ask your system administrator for the location of the certificate file.

    Linux/Mac:

    $ export NODE_EXTRA_CA_CERTS=/path/to/your/cert.pem

    Windows:

    $ setx NODE_EXTRA_CA_CERTS /path/to/your/cert.pem

For more details on the topic please read this article.

8. Permission issues

When running the config command, you might run into errors indicating the the config command is unable to write in the project directory:

  • Error: EPERM: operation not permitted

Make sure that the project folder is writable by the user running the mobiscroll config command.

9. Execution policy issues

On Windows client computers, the execution of PowerShell scripts is disabled by default. When installing the Mobiscroll CLI on Windows using a PowerShell you might run into the following error:

  • npm : File C:\Users\...\npm\npm.ps1 cannot be loaded because running scripts is disabled on this system.

Solution: to allow the execution of PowerShell scripts, which is needed for npm global binaries, you must set the following execution policy:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Carefully read the message displayed after executing the command and follow the instructions. Make sure you understand the implications of setting an execution policy.

If you couldn't solve the error which you are experiencing get in touch at support@mobiscroll.com.

Did this answer your question?