I installed this package in dataform successfully
https://www.npmjs.com/package/libphonenumber-js
This is how it looks the package.json
{
"name": "vx_operation",
"dependencies": {
"@dataform/core": "3.0.2",
"libphonenumber-js":"1.11.7"
}
}
This is how it looks the require statement. And I'm getting the error "Unexpected token 'export'"
Do you know what could be?
I searched the dataform documentation several times, including the googlecloudcommunity and youtube. I didn't find examples of installing external libraries.
Thanks
Solved! Go to Solution.
This is a "module" type package (ES) which requires to async.
I changed the package to google-libphonenumber and now is working fine to require the package in the standard way that dataform needs.