Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wemo-client error resolve bundle (please help me i really need this module) #74

Open
Greta-Calamari opened this issue Feb 2, 2023 · 0 comments

Comments

@Greta-Calamari
Copy link

Greta-Calamari commented Feb 2, 2023

I found this library wemo-client that recognize Wemo devices so i can use them in the application , i installed it with yarn add wemo-client , but when i use the snippets in my home component and i start the application it gives me this error:

error: Error: While trying to resolve module http from file /Users/user/lavoro/appname/node_modules/wemo-client/index.js, the package /Users/user/lavoro/appname/node_modules/http/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/gretacalamari/lavoro/appname/node_modules/http/index. Indeed, none of these files exist:

/Users/user/lavoro/appname/node_modules/http/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
/Users/user/lavoro/appname/node_modules/http/index/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx) at DependencyGraph.resolveDependency (/Users/user/lavoro/appname/node_modules/metro/src/node-haste/DependencyGraph.js:376:17) at Object.resolve (/Users/user/lavoro/appname/node_modules/metro/src/lib/transformHelpers.js:271:42) at resolve (/Users/user/lavoro/appname/node_modules/metro/src/DeltaBundler/traverseDependencies.js:571:33) at /Users/user/lavoro/appname/node_modules/metro/src/DeltaBundler/traverseDependencies.js:587:26 at Array.reduce () at resolveDependencies (/Users/user/lavoro/appname/node_modules/metro/src/DeltaBundler/traverseDependencies.js:586:33) at /Users/user/lavoro/appname/node_modules/metro/src/DeltaBundler/traverseDependencies.js:275:33 at Generator.next () at asyncGeneratorStep (/Users/user/lavoro/appname/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24) at _next (/Users/user/lavoro/appname/node_modules/metro/src/DeltaBundler/traverseDependencies.js:107:9)

here in my home screen:

import Wemo from 'wemo-client'
 const wemo = new Wemo()

  wemo.discover((err, deviceInfo) => {
    console.log('Wemo Device Found: %j', deviceInfo)
    const client = wemo.client(deviceInfo)
    client.on('error', (err) => {
      console.log('Error: %s', err.code)
    })
    client.on('binaryState', (value) => {
      console.log('Binary State changed to: %s', value)
    })
    client.setBinaryState(1)
  })

i tried to remove node modules then yarn , update and downgrade http and url but none of these steps work. can you help me , if you need if i will give them to you very greatfully

@Greta-Calamari Greta-Calamari changed the title wemo-client error resolve bundle wemo-client error resolve bundle (please help me i need this module) Feb 2, 2023
@Greta-Calamari Greta-Calamari changed the title wemo-client error resolve bundle (please help me i need this module) wemo-client error resolve bundle (please help me i really need this module) Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant