We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when i want to find out size of package 'zx', it throw a build error: 'Cannot use keyword 'await' outside an async function'
it seems, zx used new feature of node. Is package-build-stats only support to build web package?
How can i get size of node package which used node feature without webpack loader?
The text was updated successfully, but these errors were encountered:
Without seeing a code example, my best guess is that you're doing something like this:
const { getPackageStats } = require('package-build-stats') const result = await getPackageStats('some-package'); console.log(result);
Generally, you can't call await outside of an async function, meaning: you need to wrap whatever is calling await in an async function, like this:
await
// index.js const { getPackageStats } = require('package-build-stats') async function getStats() { const results = await getPackageStats('faker') console.log(results); } getStats();
Does this get you any further? Or were you trying something else? Give us an example so we can point you in the right direction.
Sorry, something went wrong.
No branches or pull requests
when i want to find out size of package 'zx', it throw a build error: 'Cannot use keyword 'await' outside an async function'
it seems, zx used new feature of node. Is package-build-stats only support to build web package?
How can i get size of node package which used node feature without webpack loader?
The text was updated successfully, but these errors were encountered: