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
https://github.com/cozie-app/cozie/blob/f425ecb3513fe01abbd4d367a12c534bb4b34f85/app/index.js#L381
The
module not defined
error exists becauseapp/index.js
is not a module, it is the main file. It therefore cannot have anexport
. 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 tobuzz.js
.index.js
therefore remains as a primary main file that pulls all the modules together into the app.