NullReferenceException: Object reference not set to an instance of an object iShake.Update () (at Assets/scripts/iShake.js:32)

I am new to javascript. I am executing the following unity script. I am getting the NullReferenceException on line 32. I will greatly helpful if anyone could identify the problem.

#pragma strict

import ThinksquirrelSoftware.Fluvio.Emitters;

var accelerometerUpdateInterval : float = 1.0 / 60.0;
var lowPassKernelWidthInSeconds : float = 1.0;
var shakeDetectionThreshold : float = 2.0;

internal var emitter : FluidEmitter;

private var lowPassFilterFactor : float = accelerometerUpdateInterval / lowPassKernelWidthInSeconds; 
private var lowPassValue : Vector3 = Vector3.zero;
private var acceleration : Vector3;
private var deltaAcceleration : Vector3;

function Start()
{
    shakeDetectionThreshold *= shakeDetectionThreshold;
    lowPassValue = Input.acceleration;
}

function Update()
{
    acceleration = Input.acceleration;
        lowPassValue = Vector3.Lerp(lowPassValue, acceleration, lowPassFilterFactor);
        deltaAcceleration = acceleration - lowPassValue;
    if (deltaAcceleration.sqrMagnitude >= shakeDetectionThreshold)
    {
        Debug.Log("Shake event detected at time "+Time.time);
    }  else {
    	Debug.Log("Shake event NOT DETECTED ");
    	**emitter.Emit();**
    }
}

You may have posted the wrong script - the script you posted doesn’t have a line 37.

I haven’t initialized the emitter, which can is dont by initializing it on onStart() method.

emitter = FluidEmitter.FindObjectOfType(FluidEmitter);

The reason is emitter is null. Where/how do you assign to it? Maybe recheck the docs or examples for Fluvio to learn how to properly set up a scenario.