cozie-app / cozie

Cozie Fitbit Smart Watch Clockface for Quick Surveys
https://cozie.app/
GNU Lesser General Public License v3.0
14 stars 13 forks source link

Module not defined error in `cozie-researcher` #90

Closed pjayathissa closed 3 years ago

pjayathissa commented 3 years ago

https://github.com/cozie-app/cozie/blob/f425ecb3513fe01abbd4d367a12c534bb4b34f85/app/index.js#L381

The module not defined error exists because app/index.js is not a module, it is the main file. It therefore cannot have an export. I'm not quite sure how the app still works with this. But it is a potential vulnerability in a subsequent update.

The way to fix this would be to create another module, lets say called generateflow.js, and make this file a module that can be exported to buzz.js. index.js therefore remains as a primary main file that pulls all the modules together into the app.

App: Unhandled exception: ReferenceError: module is not defined
  ? at app/index.js:241,1