You’re welcome
@pinacolada547 said in Desperate about Error: env.require is not a function:
The error comes up when you define a device for the plugin. Did you do that too?
Before that it compiles and starts fine.
Well, I didn’t, but I don’t get the error mentioned in your first post, i.e., “env.require is not a function”. When I define a device I get a different error “Cannot find module ‘hdc1008’”. This one is easy to fix, however. As you named the included package “hdc1008-jh” in “./hdc1008/package.json” you need to use that name for the require statement, i.e. change the statelement in line 41 of “hdc1008.coffee” as follows:
HDC1008 = require 'hdc1008-jh'
I have pimatic running on a raspberry pi and installed my plugin to pimatic-app/node_modules with the command "sudo npm install --save --unsafe-perm pimatic-hdc1008"
So i think it is not used in a standalone way?
The setup you have is not “standalone”. The way you installed the plugin it should work fine.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law