skydiver / ewelink-api

eWeLink API for JavaScript
https://www.npmjs.com/package/ewelink-api
MIT License
267 stars 108 forks source link

fs could not be found #148

Open Leohige opened 3 years ago

Leohige commented 3 years ago
Failed building JavaScript bundle.
Unable to resolve module fs from /home/leohige/Documents/light/node_modules/ewelink-api/src/mixins/saveDevicesCache.js: fs could not be found within the project.

How can I fix it? I'm using react native and I'm not calling any method, only importing the lib

const ewelink = require('ewelink-api');
xmanu91 commented 2 years ago

Hi,

I have the same issue, have you fix it ?

peppeg85 commented 2 years ago

me too, any solution?

xmanu91 commented 2 years ago

You need to use backend (nodejs) for use fs

peppeg85 commented 2 years ago

so to have a blank javacsript project, i need a server project like an express basic project? i use it inside a vue js project and it works

xmanu91 commented 2 years ago

Or you need compiler like webpack, parcel or vite

peppeg85 commented 2 years ago

thanks for your answer, i tried with a basic webpack project, but i cant make it work, do you know any scaffold/boilerplate to start a project?