๐ Could not statically evaluate fs call
See original GitHub issue๐ bug report
๐ Configuration (.babelrc, package.json, cli command)
zero config
{
"your": { "config": "here" }
}
๐ค Expected Behavior
work
๐ฏ Current Behavior
node_modules/options/lib/options.js: Could not statically evaluate fs call
at evaluate (/Users/victor/.config/yarn/global/node_modules/parcel-bundler/src/visitors/fs.js:163:11)
at CallExpression.path.get.map.arg (/Users/victor/.config/yarn/global/node_modules/parcel-bundler/src/visitors/fs.js:30:21)
at Array.map (<anonymous>)
at JSAsset.CallExpression (/Users/victor/.config/yarn/global/node_modules/parcel-bundler/src/visitors/fs.js:30:10)
at NodePath._call (/Users/victor/.config/yarn/global/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/Users/victor/.config/yarn/global/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/Users/victor/.config/yarn/global/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/Users/victor/.config/yarn/global/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/Users/victor/.config/yarn/global/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/Users/victor/.config/yarn/global/node_modules/babel-traverse/lib/context.js:190:19)
๐ Possible Solution
๐ฆ Context
๐ป Code Sample
import Gdax from 'gdax'
const publicClient = new Gdax.PublicClient()
publicClient
.getProducts()
.then(data => {
console.log(data)
})
.catch(error => {
console.log(error)
})
๐ Your Environment
| Software | Version(s) |
|---|---|
| Parcel | 1.4.1 |
| Node | 9.3.0 |
| npm/Yarn | 1.3.2 |
| Operating System | macOS 10.13.3 |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (2 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 >How to Evaluate Open Source Software / Free Software (OSS ...
This paper describes how to evaluate open source software / free software.
Read more >API - esbuild
This API call is used by the command-line interface if no input files are provided and the --bundle flag is not present. In...
Read more >2022 Edition GOVERNMENT-IN- THE-SUNSHINE MANUAL
consultants while negotiating a memorandum of understanding with a baseball team did not violate the Sunshine Law because the administrator's โso-called ...
Read more >Changelog โ Python 3.11.1 documentation
gh-99886: Fix a crash when an object which does not have a dictionary frees its instance values. gh-99891: Fix a bug in the...
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

In my case, doesnโt fix it. Why happens it this?
@stychu if you want a temporary workaround you can edit
node_modules/mime/package.jsonto add this :Itโll instruct Parcel to ignore all fs calls for this module.