Skip to content

Node 8 Migration Warnings

Bobby Johnson edited this page May 22, 2018 · 2 revisions

Migration Guidance for Warnings

Update May 23, 2018: The Webtask.io migration to Node 8 is complete. All webtasks that were not migrated using the tools described below were automatically migrated to the new Node 8 environment.

If you are receiving deprecation errors or having any issues post-migration, please visit the Extend forum for instructions on resolving this issue.

When migrating a webtask from the Node 4 to the Node 8 deployments, one or more warnings may be reported.

The first step in addressing these warnings is to try executing the webtask on the Node 8 deployment. If the webtask executes successfully, you may be able to safely ignore these warnings.

However, if your webtask does not execute successfully on the Node 8 deployment, but does on the Node 4 deployment, you should try to resolve each of the warnings that were reported during the migration.

Guidance on how to resolve each type of warning is given below. The list of warning types includes:

Error Description
analysisFailed The attempt to analyze the webtask code failed
activeCron An active CRON job was migrated to the new Node 8 deployment
unknownVersion The webtask uses a node module, the version of which could not be determined
dynamicRequire The webtask code has a require() with a non-string literal value
unknownGlobal The webtask code uses a non-platform global
provisioningModule The webtask code requires an npm module that is currently being provisioned on the webtasks platform
unsupportedModule The webtask code requires a version of an npm module that is not supported on Node 8
unknownCompiler The webtask uses a compiler that may require additional node module dependencies to be declared
unsupportedClaim The webtask uses a deprecated feature that is not supported on the Node 8 deployment
hostDetected The webtask uses a host for custom domain support
githubDetected The webtask uses GitHub integration

AnalysisFailed

The migration process will analyze the webtask code to discover any npm modules that are required within the code and need to be declared as dependencies via metadata.

You most likely have received this warning for one of two reasons:

  • The webtask code has syntax errors
  • The webtask uses a compiler that transpiles and the webtask code itself is not Javascript

If you are using a compiler with the webtask, try executing the webtask on the Node 8 deployment. If the webtask executes successfully, you can ignore this warning.

If you are not using a compiler, look for syntax errors in the webtask code that may need to be fixed for the webtask to execute successfully. After you have fixed all the syntax errors, you may also need to ensure that all of the npm modules required in the code are declared as dependencies via metadata.

ActiveCron

When migrating a webtask from the Node 4 to the Node 8 deployment, the process will try to detect CRON jobs associated with the webtask and migrate the CRON job as well. If the CRON job was in an 'active' state on the Node 4 deployment, it will also be created on the Node 8 deployment in an 'active' state. Therefore, the CRON job will execute in both deployments--effectively executing twice.

If the CRON job is executing successfully on the Node 8 deployment, you can safely disable the CRON job on the Node 4 deployment.

UnknownVersion

The migration process analyzed the webtask code and detected a 'require()' in the code for an npm module. However, the version of the npm module could not be determined.

If you received this warning, ensure that the npm module with the correct version is declared as a dependency via metadata.

DynamicRequire

The migration process analyzed the webtask code and detected a dynamic 'require()'--that is a require of a non-string literal. For example:

const lodashModuleName = 'lodash';
const _ = require(lodashModuleName);

If you received this warning, ensure that all of the npm modules that might possibly be required are declared as dependencies via metadata.

UnknownGlobal

The migration process analyzed the webtask code and detected an unknown, non-platform global. It is possible that this global may assume an implicit dependency that was never declared, happened to be present on the Node 4 deployment but is not present on the Node 8 deployment.

If you received this warning, ensure that all of the npm modules that might possibly be required for the webtask to execute successfully are declared as dependencies via metadata.

ProvisioningModule

The migration process analyzed the webtask code and discovered an npm module dependency. That npm module is currently being provisioned on the Node 8 deployment. It can take anywhere from a few seconds to a few minutes for an npm module to be provisioned. Your webtask may not execute successfully until after the provisioning has completed.

UnsupportedModule

The migration process analyzed the webtask code and discovered an npm module dependency. Unfortunately, the given version of that npm module is not supported with Node 8. Most likely there is a newer version of the module that is supported on Node 8. You will need to update your webtask code to use that newer version of the npm module and then declare the npm module and version as a dependency via metadata.

UnknownCompiler

The migration process will detect if a webtask uses a compiler. If the compiler is an npm module, it will add the npm module as a dependency declared via the webtask metadata. If the compiler is hosted at a public URL, it will attempt to retrieve and analyze the compiler code to discover all npm module dependencies that need to be declared via metadata for webtask to execute successfully on the Node 8 deployment.

If you received this warning, the compiler code used by the webtask could not be analyzed successfully, so not all npm module dependencies might have been discovered. If the compiler is itself an npm module, ensure that it is declared as an npm module dependency via metadata. If the compiler is hosted at a public URL and requires other npm modules, ensure that those npm modules are declared as dependencies via metadata.

UnsupportedClaim

The migration process detected that the webtask was created with a token that uses legacy claims. The two legacy claims that are no longer supported are pb for "parse body" and mb for "merge body".

Regarding the pb claim, if your webtask code was relying on the webtask platform to parse the request body, you will need to update your webtask code to parse the request body in the webtask itself. This only applies if your webtask is using the advanced programming model that exports a function signature that includes the context object, the HTTP request object, and the HTTP response object. If your webtask is using the simpler programming models that only exports a function with callback parameter, then the webtask platform will continue to parse the request body.

Regarding the mb claim, if your webtask code relying on the webtask platform to merge the HTTP request body into the 'data' property of the context object, you will need to update your webtask code. If your webtask is using the advanced programming model that exports a function signature that includes the context object, the HTTP request object, and the HTTP response object, you will need to update your webtask code to parse the request body in the webtask itself. If your webtask is using the simpler programming models that only exports a function with callback parameter, then the parsed request body will be available via the 'body' property of the context object.

HostDetected

The migration process detected that the webtask uses a hostname for custom domain name support. You will need to update the CNAME record with your hosting provider to point to the new deployment URL for the Node 8 deployment.

GithubDetected

The migration process detected that the webtask uses the GitHub integration feature. You will need to re-enable GitHub integration on the Node 8 deployment.