Open lvl99 opened 3 years ago
This is really killing me. No idea how I can resolve this! What I thought would be a simple deployment has turned into hair pulling bald head episode.
bumping as I have the same issue
Yep, my Cloud Build is still broken...
I'm getting this error as well. Has anyone found a solution?
I'm running my project within GCP Cloud Build and I'm getting the following error while running tests within Jest via NPM:
When I look at the lines in
gcp-metadata/node_modules/json-bigint/lib/parse.js:208
it seems that there's arequire('BigNumber')
which I think is causing the above issue in my test:https://github.com/sidorares/json-bigint/blob/master/lib/parse.js#L208
I'm also importing BigNumber within my own project (in fact, in the tests that this error occurs, it's for functionality that I've built that relies on BigNumber) so I'm in a weird tricky spot where a dependency is doing magical things (
gcp-metadata
is being invoked during the test /somehow/) and a dependency of that (json-bigint
) has an error which is completely halting my CI deployment process.It seems like BigNumber should just be required at the top of the script (where you have
var BigNumber = null
) and avoid the inline import with conditional check on line 208. The conditional check seems like it should only require BigNumber if_options.useNativeBigInt
is false.