ionic-team / ionic-team/rollup-plugin-node-polyfills
Can't get `__dirname` to work
- Vorherrschende Sprache
- JavaScript
- Sterne
- 142
- Forks
- 65
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with src/index.ts at lines 54-55, then reproduce the __dirname failure shown in the report and compare the linked upstream issue. Done means using __dirname no longer produces a path containing null bytes or the node-polyfills:dirname error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, node.js
- Bereich
- build-system, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100