ionic-team / ionic-team/rollup-plugin-node-polyfills
Can't get `__dirname` to work
- Langage dominant
- JavaScript
- Étoiles
- 142
- Forks
- 65
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
When I'm trying to use `__dirname` I get:
```
(node:2824) UnhandledPromiseRejectionWarning: Error: Could not load node-polyfills:dirname (imported by /home/sasha/rotorjs/node_modules/tman/lib/tman.js): Path must be a string without null bytes
at /home/sasha/rotorjs/node_modules/rollup/dist/rollup.js:21718:19
at
```
Null byte (`\0`) is really in [these lines](https://github.com/ionic-team/rollup-plugin-node-polyfills/blob/v0.2.1/src/index.ts#L54-L55). It was introduced in https://github.com/calvinmetcalf/rollup-plugin-node-globals/pull/3 .
See also: https://github.com/calvinmetcalf/rollup-plugin-node-globals/issues/23 .
P.S. Thanks for the fork! :)
/cc @manucorporat
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par src/index.ts aux lignes 54-55, puis reproduisez l’erreur __dirname présentée dans le rapport et comparez avec l’issue upstream liée. C’est terminé lorsque l’utilisation de __dirname ne produit plus de chemin contenant des octets nuls ni l’erreur node-polyfills:dirname.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, node.js
- Domaine
- build-system, tooling
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100