I'm a software engineer from Sydney, Australia. I love solving complex issues through purposeful software. I also enjoy a good burger and g&t.
You can usually find me on Twitter
nodejs script to delete old tweets
License: MIT License
I'm a software engineer from Sydney, Australia. I love solving complex issues through purposeful software. I also enjoy a good burger and g&t.
You can usually find me on Twitter
Hello,
I have an error running the app.
`Reading tweet.js file
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Object. (/home/ubuntu/delete-old-tweets/index.js:22:20)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47`
Do you know how to resolve it?
Thanks in advance
Best
I tried to run the script but got the following:
TypeError: Cannot destructure property 'code' of 'error[0]' as it is undefined. at /Users/mahmoudhamra/Desktop/tweets/delete-old-tweets-master/index.js:55:17 at Request._callback (/Users/mahmoudhamra/Desktop/tweets/delete-old-tweets-master/node_modules/twitter/lib/twitter.js:220:14) at Request.self.callback (/Users/mahmoudhamra/Desktop/tweets/delete-old-tweets-master/node_modules/request/request.js:185:22) at Request.emit (node:events:520:28) at Request.<anonymous> (/Users/mahmoudhamra/Desktop/tweets/delete-old-tweets-master/node_modules/request/request.js:1161:10) at Request.emit (node:events:520:28) at IncomingMessage.<anonymous> (/Users/mahmoudhamra/Desktop/tweets/delete-old-tweets-master/node_modules/request/request.js:1083:12) at Object.onceWrapper (node:events:639:28) at IncomingMessage.emit (node:events:532:35) at endReadableNT (node:internal/streams/readable:1346:12)
I get this error when running node index.js -d 2015-01-01
:
SyntaxError: Unexpected token w in JSON at position 0
I also had to rename tweets.js
to tweet.js
from the downloaded archive.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.