Import random not working

My experiment is running fine locally, but when I try to run it online, I am getting an error saying “Unexpected token’ in the ‘Begin JS Experiment’ tab” I am trying to use random so i can randomize conditions. Any thoughts? Below is the line that is giving me trouble

import * as random from 'random';

You can’t import Python packages with JS code.
Please refer to the crib sheet for details.

1 Like