metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.52k stars 605 forks source link

Cannot read property 'option' of undefined #646

Closed spanishproperty closed 6 years ago

spanishproperty commented 6 years ago

Hi,

I'm no good at javascript - so sorry in advance if this shouldn't go here, I just don't know where else to go for this flickity error.

In chrome I am getting this javascript error:

Uncaught TypeError: Cannot read property 'option' of undefined at new l (flickity.js:1) at flickity.js:1 at Array.forEach () at flickity.js:1

Does anyone know the fix or what I am doing wrong? ( Web URL is https://www.domusvenari.com/ )

Thanks in advance.

Richie

yaodingyd commented 6 years ago

You have two Flickity.js included in your JS. One is in https://www.domusvenari.com/templates/responsive/js/scripts.js, the other one is the https://www.domusvenari.com/templates/responsive/js/flickity.js.

spanishproperty commented 6 years ago

@yaodingyd - thank you very much. Stupid me, I was adding all js files into one, and forgot to take that one out! Stupid mistake, but sometimes you need two sets of eyes to find the problem.

Thanks again.

yaodingyd commented 6 years ago

@spanishproperty no problem. Happy to help.

Pooja-Suresh-Mehta commented 6 years ago

@yaodingyd I am facing the same error : Cannot read property 'options' of undefined [connection-1] disconnected connect ETIMEDOUT 40.83.177.42:5671 [connection-1] disconnected connect ETIMEDOUT 40.83.177.42:5671 [connection-1] disconnected connect ETIMEDOUT 40.83.177.42:5671 [connection-1] disconnected connect ETIMEDOUT 40.83.177.42:5671

My javascript code is:

'use strict'; var connectionString = 'HostName=goapl-goregoan.azure-devices.net;SharedAccessKeyName=service;SharedAccessKey=1sMhy8SH2UYFRXHZgP5vipCM7IeiaSn6VYH9bfkyVLI='; var { EventHubClient, EventPosition } = require('azure-event-hubs');

var printError = function (err) { console.log(err.message); };

var printMessage = function (message) { console.log('Telemetry received: '); console.log(JSON.stringify(message.body)); console.log('Application properties (set by device): ') console.log(JSON.stringify(message.applicationProperties)); console.log('System properties (set by IoT Hub): ') console.log(JSON.stringify(message.annotations)); console.log(''); };

var ehClient; EventHubClient.createFromIotHubConnectionString(connectionString).then(function (client) { console.log("Successully created the EventHub Client from iothub connection string."); ehClient = client; return ehClient.getPartitionIds(); }).then(function (ids) { console.log("The partition ids are: ", ids); return ids.map(function (id) { return ehClient.receive(id, printMessage, printError, { eventPosition: EventPosition.fromEnqueuedTime(Date.now()) }); }); }).catch(printError);

harshs07 commented 6 years ago

@Pooja-Suresh-Mehta were you able to resolve the issue? I am facing the same issue.

Pooja-Suresh-Mehta commented 6 years ago

Hello,

The problem was with my firewall blocking the requests sent by the device.

Regards, Pooja Mehta Sent from my iPhone

On 11-Jul-2018, at 1:52 AM, Harsh Shah notifications@github.com wrote:

@Pooja-Suresh-Mehta were you able to resolve the issue? I am facing the same issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.