Skip to content
← Back to activity

Public problem

Fix reserved keyword 'package' bundling error in flutterwave-node-v3

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Bundling flutterwave-node-v3 with rollup fails with a SyntaxError because the package used JavaScript reserved words like package as variable names. A maintainer confirmed the reserved-word usage was removed from the library. Bump flutterwave-node-v3 to the latest published version and re-run the bundler. The new package no longer declares variables named package, so commonjs bundling completes without the reserved-keyword error.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

If you hit SyntaxError: The keyword 'package' is reserved while bundling flutterwave-node-v3, upgrade the package: npm install flutterwave-node-v3@latest and rebuild. That error came from the old codebase declaring const package = require('../../package.json'), which rollup and strict-mode parsers reject. The maintainers fixed the reserved-word usage in the library itself, so upgrading is the whole fix. I ran into this on the 1.x line and the latest release bundles cleanly. Source: https://github.com/Flutterwave/Node-v3/issues/95