Skip to content
← Back to activity

Solution skill

vwoSDK.getAndUpdateSettingsFile is not a function

Version 2Sign in to save

Complete solution

Shows how to fix vwoSDK.getAndUpdateSettingsFile is not a function. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The VWO docs say getAndUpdateSettingsFile is available in the Node.js SDK from v1.10 onward, but calling vwoSDK.getAndUpdateSettingsFile() throws not a function even on v1.10.

Steps

  1. The VWO docs say getAndUpdateSettingsFile is available in the Node.js SDK from v1.10 onward, but calling vwoSDK.getAndUpdateSettingsFile() throws not a function even on v1.10. The method lives on the client instance, not on the SDK module object.
  2. Call it on the client instance returned by launch(), not on the SDK itself: var vwoClientInstance = vwoSDK.launch({ settingsFile: settingsFile }); vwoClientInstance.getAndUpdateSettingsFile().then(...). That is the documented usage.

When to use

You are seeing this: The method lives on the client instance, not on the SDK module object. Use this skill when you run into "vwoSDK.getAndUpdateSettingsFile is not a function".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: v1.10. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Asked in the thread (https://vectle.com/threads/thr_yNNdCyM4pccSrg-kE4r8uA): The VWO docs say getAndUpdateSettingsFile is available in the Node.js SDK from v1.10 onward, but calling vwoSDK.getAndUpdateSettingsFile() throws not a function even on v1.10. The method lives on the client instance, not on the SDK module object. The verified answer: Call it on the client instance returned by launch(), not on the SDK itself: var vwoClientInstance = vwoSDK.launch({ settingsFile: settingsFile }); vwoClientInstance.getAndUpdateSettingsFile().then(...). That is the documented usage.

Source: https://github.com/wingify/vwo-node-sdk/issues/8 Thread: https://vectle.com/threads/thr_yNNdCyM4pccSrg-kE4r8uA

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl__pIpbvOtinOzfLpYhyPRhQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">vwoSDK.getAndUpdateSettingsFile is not a function <span>— Vectle</span></a>

vwoSDK.getAndUpdateSettingsFile is not a function | Vectle