Comments (3)
The packages are distributed in the dist
not lib
directory for this module, please update the import to use the dist
files and let me know if that is still an issue.
from node-hue-api.
This is what I've tried:
import Api from "node-hue-api/dist/esm/api/Api";
import { createLocal } from "node-hue-api/dist/esm/api";
PHPStorm is not aware of any problems, but when I try to build, this is the error I'm getting:
build failed (src/hue/index.ts:3:28 import { createLocal } from "node-hue-api/dist/esm/api";): Could not resolve "node-hue-api/dist/esm/api"
Same goes if I substitute esm
for cjs
.
A workaround is to do this instead, but I'd rather know how to do it without:
import { v3 } from "node-hue-api";
v3.api.createLocal(…);
from node-hue-api.
Specifying Api
as a return type was giving me trouble. The solution was this:
import { discovery, v3 } from "node-hue-api";
import { Api } from "node-hue-api/dist/esm/api/Api";
What threw me off was having to import Api
which was specified in the file Api
which was a part of the folder api
.
I would suggest improving this.
from node-hue-api.
Related Issues (20)
- Error when using Webpack / Electron HOT 1
- Example typo
- Touchlink activation HOT 1
- Cant get this to work with React.JS HOT 2
- Export as esm module HOT 20
- mDNS Discovery HOT 4
- ApiError: Problems resolving hue bridges, HTTP error status: 429 HOT 15
- Example doesn't work HOT 2
- api.sensors.updateSensorConfig not working due to un-settable params included in request HOT 3
- Failed to create sensor from bridge model: Error: Unknown type 'zllrelativerotary' to create Bridge Model Object HOT 3
- MDNS Discovery not working (Empty Array) HOT 12
- Implement RGB support for groups HOT 1
- Hue API V2
- ApiError: Problems resolving hue bridges, HTTP error status: 429 HOT 1
- bridge-validation.ts is missing bridgeid
- setLightState sets bri to 1 [esmodules] HOT 1
- Cannot be used in browser due to a minor issue
- Please make Rate Limiting configurable HOT 3
- Getting Value, '65520' is not within allowed limits: min=-255 max=255 for 'id' when using Philips Hue-Bridge adapter in iobroker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-hue-api.