GoogleCloudPlatform / stackdriver-errors-js

Client-side JavaScript exception reporting library for Cloud Error Reporting
https://cloud.google.com/error-reporting/
Apache License 2.0
362 stars 54 forks source link

Error when generating new `dist` version #91

Open steren opened 3 years ago

steren commented 3 years ago

I tried generating a new version with npm run dist, but I got:

$ npm run dist

> stackdriver-errors-js@0.8.0 dist /workspaces/stackdriver-errors-js
> gulp lib-concat

fs.js:45
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:45:5
    at req_ (/workspaces/stackdriver-errors-js/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/workspaces/stackdriver-errors-js/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/workspaces/stackdriver-errors-js/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! stackdriver-errors-js@0.8.0 dist: `gulp lib-concat`
npm ERR! Exit status 1
steren commented 3 years ago

I don't have much time to troubleshoot, if anyone wants to take a look, please do (CC @jmasukawa)

jmasukawa commented 3 years ago

I actually ran into this while trying to run the unit tests locally. I ended up using an older version of node that was compatible with gulp v3.x. Try out node v10.x?

Source: https://stackoverflow.com/q/55921442

By the way, I was using NVM on my workstation so it was easy to switch versions: https://github.com/nvm-sh/nvm

steren commented 3 years ago

I'd rather update the dist and test codebase to be compatible with recent node.js version.

Is this something you could help @jmasukawa ?

After that, I can cut a new module version

jmasukawa commented 3 years ago

Yeah that makes sense, ~~I can give it a shot sometime this coming week. πŸ‘ ~~

Update: clearly I didn't find time to do this. πŸ™

@steren maybe don't count on me to handle this anymore. πŸ™‚ We found that stackdriver-errors-js reports errors with obfuscated stacktraces in a production web apps, so we need something custom anyways, and won't be using stackdriver-errors-js anymore. As a result, my personal investment in this has been...diminished. πŸ˜… Thanks though!