fs.readFileSync - Cannot statically evaluate fs argument
See original GitHub issue๐ bug report
๐ Configuration (.babelrc, package.json, cli command)
{
"your": { "config": "here" }
}
๐ค Expected Behavior
๐ฏ Current Behavior
๐ Possible Solution
๐ฆ Context
๐ป Code Sample
https://github.com/mytee306/marked-intro
๐ Your Environment
Software | Version(s) |
---|---|
Parcel | latest |
Node | latest |
npm/Yarn | latest |
Operating System | linux mint |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:21 (6 by maintainers)
Top Results From Across the Web
Cannot statically evaluate fs argument? - Stack Overflow
My guess is that you have this in server-side code but accidentally have the bundler trying to bundle it. (Bundlers don't like non-static...
Read more >@parcel/fs - npm
Start using @parcel/fs in your project by running `npm i @parcel/fs`. There are 46 other projects in the npm registry using @parcel/fs.
Read more >Trying To Import Results In Fs.Existssync Is Not A Function
Synchronously tests whether or not the given path exists by checking with the file system. Most used fs functions. readFileSync. Synchronously reads the...
Read more >Node.js v19.3.0 Documentation
Passing arguments and this to listeners; Asynchronous vs. synchronous; Handling events ... readFileSync(path[, options]); fs. ... error cannot be a string.
Read more >Scripting Languages I: Node.js, Python, PHP, Ruby
read file into string, let fs = require('fs'); let s = fs.readFileSync('/etc/hosts', 'utf8');, s = f.read(), $s = file_get_contents(
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
just tell parcel youโre running in a node environment with the
target
flage.g.
parcel app.js --target node
@codeshifu That is all it takes!