Closed shashank0708 closed 6 years ago
Hi, @shashank0708
How do you fix this? We meet the same issue.
@lijuanliu2018 ECMAScript Modules are still experimental so I'm not inclined to invest into resolving this. Use Babel, TypeScript, etc. if you want this functionality now.
Alternatively, you are able to work around this by simply using the default export:
import TikTokAPI from 'tiktok-api';
const requestParams = TikTokAPI.getRequestParams({...});
I am running the app like this:-
node --experimental-modules index.mjs
and this is line is giving error
import TikTokAPI, { getRequestParams } from 'tiktok-api';
error:-
P.S I am new to node.js.