NativeScript / NativeScript/nativescript-cli
forced require of non-existant buffer
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 6.8.0
- Cross-platform modules: 6.5.15
- Android Runtime: 6.5.3
- iOS Runtime: 6.5.2
Describe the bug
After updating the node_modules in my project including js-base64, starting the app resulted in an exception on trying to require the module buffer, which was never anywhere explicitly required.
According to the author (https://github.com/dankogai/js-base64/issues/126#issuecomment-674838031) the new version does check for existence of the Buffer object to maybe use it if available.
Expected behavior
Either do not add the require('buffer') or add buffer to the dependencies if not already there.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing app startup with the listed NativeScript versions and inspect the dependency path from js-base64 to the unavailable buffer module. Check the CLI's dependency declarations and startup handling; done when the app no longer attempts an unavailable require, either because the dependency is available or the require is not introduced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, javascript
- Domain
- cli, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100