FS function is not a function
Sliwekok opened this issue · comments
Describe the bug
fs.readdirSync is not a function
NodeJS Version
16.13.2
npm Version
8.1.2
warframe-items Version
1.1253.477
Access Method
npm Package (Default)
What happened?
After installation and adding package to project i got that error:
Uncaught TypeError: fs.readdirSync is not a function
.
I've added package by npm using npm install warframe-items
and added to my js file using
const warframe = require('warframe-items'); const items = new warframe(['All']);
Here's code at index.js from node package visible from browser
Any ideas how to deal with it?
You don't really have a file system in the browser, so there's no way for fs to work.
Also, don't use this directly from the browser. If you need to query or cache items from your browser, use the API we provide.
Okay well, didn't knew ther's API.
That solves problem