Parcel: Solving "No transformers found for ..." error

Created on 12 Feb 2020  ·  2Comments  ·  Source: parcel-bundler/parcel

❔ Question

What's the recommended solution when dealing with the error: No transformers found for ......
where there's no need for a transformer ? (i.e. geojson file)

Is it a bug ? Maybe warning instead of error and treat as plain text ?

🔦 Context

Unable to finish build

💻 Code Sample

const g = await fetch( require("./assets/foo.geojson") )

Error:

 🚨 Build failed.
Error: No transformers found for "/path/src/assets/foo.geojson".
Error: No transformers found for "/path/src/assets/foo.geojson".
    at ParcelConfig.getTransformerNames (/path/src/node_modules/@parcel/core/lib/ParcelConfig.js:127:13)
    at ConfigLoader.loadParcelConfig (/path/src/node_modules/@parcel/core/lib/ConfigLoader.js:86:32)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async PromiseQueue._runFn (/path/src/node_modules/@parcel/utils/lib/PromiseQueue.js:98:7)
    at async PromiseQueue._next (/path/src/node_modules/@parcel/utils/lib/PromiseQueue.js:85:5)
error Command failed with exit code 1.

🌍 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 2.0.0-nightly.95+a63f3fc9
| Node | 13.8.0
| npm/Yarn | yarn 1.22.0
| Operating System | macOS 10.15

Most helpful comment

fetch( require("url:./assets/foo.geojson") )

(As of recently, the url part is required)

All 2 comments

fetch( require("url:./assets/foo.geojson") )

(As of recently, the url part is required)

🤦‍♂️ thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adamreisnz picture adamreisnz  ·  3Comments

jsftw86 picture jsftw86  ·  3Comments

davidnagli picture davidnagli  ·  3Comments

algebraic-brain picture algebraic-brain  ·  3Comments

Niggler picture Niggler  ·  3Comments