-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parcel cannot resolve Node.js lib/fs.js promise-based APIs from 'fs/promises' #7403
Comments
I'm having the same issue. Every time I try to build a file containing |
You can test that PR with
which builds successfully. So this will be fixed in the next release |
@mischnic I tried it and this is what I'm getting:
|
I ran into the same DOMException noted by @sepsol when testing "parcel": "2.0.0-nightly.945" on my small bug-demonstration project. As a gut check, I jumped over to a working parcel project and replaced "parcel": ">=2.0.1" with "parcel": "2.0.0-nightly.945". There too, I ran into the DOMException issue only when using ..945. At this point, I stopped. My best guess was that some other issue may be impacting "2.0.0-nightly.945" (i.e., unrelated to this thread). |
Can someone post a full reproduction (zip/git repo) including a lockfile? It was working for me |
Let me know if this helps. The See |
I tear down node_modules per build and only install Parcel. Is the nightly version picking up the dependencies (i.e., across other nightly versions)? |
@mischnic I've attached a minimal reproducible monorepo example: UPDATE |
This issue is similar to Parcel issue #7329, which was closed by pull #7348.
🐛 bug report
When Parcel processes a trivial ES6 javascript file with an import from
fs/promises
, it complains thatfs/promises
is not declared inpackage.json
.🎛 Configuration
Node v16.13.0
Npm 8.1.0
No use of Babel or Frameworks
Complete Example
example.js
package.json
🤔 Expected Behavior
Use of
import {writeFile} from 'fs/promises';
should not require an external dependency entry inpackage.json
.😯 Current Behavior
Sample Run
💁 Possible Solution
Revisit and adjust Parcel pull #7348.
It is unclear whether this is a broad issue with built-in libraries or if the embedded character
/
infs/promises
contributes to the isseue.🔦 Context
See the two-file example above.
💻 Code Sample
See
package.json
andexample.js
above.🌍 Your Environment
The text was updated successfully, but these errors were encountered: