-
Notifications
You must be signed in to change notification settings - Fork 6
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
new to javascript, can't get anything to work #19
Comments
I would recommend to use TypeScript. npm init -y
npx tsc --init
npm install wikifolio
mkdir example.ts import { Api } from 'wikifolio';
async function fetchPrice() {
const api = new Api({email: '', password: ''});
const wikifolio = api.wikifolio('')
const price = await wikifolio.price();
console.log(price);
}
fetchPrice(); npx ts-node example.ts |
Thank you very much for your fast and working answer, but when I use instead of import { Api } from 'wikifolio';
async function main() {
const api = new Api({email: 'email', password: 'password'});
const wikifolio = api.wikifolio('wikifolioID')
//const price = await wikifolio.price();
//console.log(price);
const details = await wikifolio.details();
console.log(details);
}
main();
|
throw new Error('Wikifolio JSON not found. This is probably a bug, please report it.') See #15. Wikifolio recently released a new version, that's why some features are currently broken. I hope to find some time to fix it soon. |
Hi, I'm totally new to javascript and I can't get this to run. I made a new folder and run inside this
I created a new file
index.js
with this contentBut I get the following error when running
node index
:When I add
"type": "module"
to the package.json file I get the following errorThe text was updated successfully, but these errors were encountered: