IBM Support

Build app container error "Failed to fetch platform cordova-ios-5.1.1.tgz"

Troubleshooting


Problem

 
Build log file under MaximoAnywhereAppCntr/logs directory

Failed to fetch platform /Applications/IBM/Anywhere/MaximoAnywhereAppCntr/platforms/ios/cordova-ios-5.1.1.tgz
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1
Error output: npm WARN registry Using stale data from https://registry.npmjs.org/ because the host is inaccessible -- are you offline?
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation. 
npm ERR! Unexpected end of JSON input while parsing near '...0dkf;3ct6t3K0j5HeLKG4'

Resolving The Problem

STEPS:

1) Run the npm cache command to clear cache in npm:

npm config set fetch-retry-maxtimeout 60000 -g

npm cache clean --force

npm cache verify

Expected output:

Cache verified and compressed (~/.npm/_cacache):

Content verified: 0 (0 bytes)

Index entries: 0

Finished in 0.009s

2) Delete the following files and folders

/MaximoAnywhereContainer/package.lock.json  

/MaximoAnywhereContainer/node_modules/*  

/MaximoAnywhereContainer/plugins/*

3) Run the "./build.sh" command under MaximoAnywhereContainer

This time build is successful

Related Information

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSPJLC","label":"Maximo Anywhere"},"ARM Category":[{"code":"a8m50000000CbH1AAK","label":"Maximo Mobility"}],"ARM Case Number":"TS008723224","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Product Synonym

Maximo Anywhere

Document Information

Modified date:
15 March 2022

UID

ibm16563863