question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

๐Ÿ› 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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
senseijuradocommented, Apr 6, 2020

@stychu if you want a temporary workaround you can edit node_modules/mime/package.json to add this :

{
  ...,
  "browser": {
    "fs": false
  }
}

Itโ€™ll instruct Parcel to ignore all fs calls for this module.

In my case, doesnโ€™t fix it. Why happens it this?

2reactions
fathybcommented, Feb 20, 2018

@stychu if you want a temporary workaround you can edit node_modules/mime/package.json to add this :

{
  ...,
  "browser": {
    "fs": false
  }
}

Itโ€™ll instruct Parcel to ignore all fs calls for this module.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found