stacktracejs / error-stack-parser

Extract meaning from JS Errors
https://www.stacktracejs.com/#!/docs/error-stack-parser
MIT License
450 stars 52 forks source link

Build issue with npm #64

Closed rajusah15 closed 2 years ago

rajusah15 commented 3 years ago

Hi Team,

while i was trying to build the package "error-stack-parser" and git URL: https://github.com/stacktracejs/error-stack-parser.git on power(ppc64le), getting build error with "npm". Also observed that if i build this package with "yarn" no build error or test errors are there. I just wanted to confirm you once,

  1. Is it okay if i build with "yarn" as there is no any issue with this.

    1. Can you please tell me how to build this package with "npm"

    tried in building package with npm : npm : 6.4.13 node: v12.22.3 platform: ppc64le OS: Linux npm build error:

    npm WARN lifecycle error-stack-parser@2.0.6~prepare: cannot run in wd error-stack-parser@2.0.6 cp error-stack-parser.js dist/ && uglifyjs node_modules/stackframe/stackframe.js error-stack-parser.js -o dist/error-stack-parser.min.js --compress --mangle --source-map "url=error-stack-parser.min.js.map" (wd=/root/error-stack-parser) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"ppc64"})

    removed 1 package and audited 593 packages in 4.26s

    15 packages are looking for funding run npm fund for details

    found 12 vulnerabilities (3 low, 8 moderate, 1 high) run npm audit fix to fix them, or npm audit for details

yarn build and test logs(build and test succeeded):

[root@8eef1ccfa9d3 error-stack-parser]# yarn install
yarn install v1.22.10
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning phantomjs-prebuilt@2.1.16: this package is now deprecated
warning phantomjs-prebuilt > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning phantomjs-prebuilt > request > har-validator@5.1.5: this library is no longer supported
warning phantomjs-prebuilt > request > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning karma-coveralls > coveralls > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning karma-phantomjs-launcher > phantomjs-prebuilt@2.1.16: this package is now deprecated
warning uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
$ cp error-stack-parser.js dist/ && uglifyjs node_modules/stackframe/stackframe.js error-stack-parser.js -o dist/error-stack-parser.min.js --compress --mangle --source-map "url=error-stack-parser.min.js.map"
Done in 7.60s.
[root@8eef1ccfa9d3 error-stack-parser]# yarn audit
yarn audit v1.22.10
0 vulnerabilities found - Packages audited: 437
Done in 1.13s.
[root@8eef1ccfa9d3 error-stack-parser]# yarn test
yarn run v1.22.10
$ karma start karma.conf.js --single-run
21 07 2021 06:45:13.096:INFO [karma-server]: Karma v6.3.4 server started at http://localhost:9876/
21 07 2021 06:45:13.099:INFO [launcher]: Launching browsers PhantomJS with concurrency unlimited
21 07 2021 06:45:13.104:INFO [launcher]: Starting browser PhantomJS
21 07 2021 06:45:14.643:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket VgQk6qWFl1fvP8PcAAAB with id 59986814
PhantomJS 2.1.1 (Linux 0.0.0) ERROR LOG: 'DEPRECATION: Setting specFilter directly on Env is deprecated and will be removed in a future version of Jasmine, please use the specFilter option in `configure`'

ErrorStackParser

parse

  ✓ should parse IE 11 Error stacks
  ✓ should parse V8 Error.stack entries with port numbers
  ✓ should parse Opera 11 Error messages
  ✓ should handle spaces in Node.js stacks
  ✓ should parse V8 Error.stack
  ✓ should parse stack traces with @ in the URL
  ✓ should parse V8 entries with no location
  ✓ should parse stack traces with @ in the URL and the method
  ✓ should handle newlines in Error stack messages
  ✓ should handle webpack eval stacks
  ✓ should parse nested eval() from Firefox 43
  ✓ should parse nested eval() from Edge
  ✓ should parse function names containing @ in Firefox 43 Error.stack
  ✓ should not parse IE 9 Error
  ✓ should parse Opera 25 Error stacks
  ✓ should parse Safari 6 Error.stack
  ✓ should parse Opera 10 Error messages
  ✓ should parse Opera 9.27 Error messages
  ✓ should parse error stacks with Constructors
  ✓ should parse IE 10 Error stacks
  ✓ should parse nested eval() from V8
  ✓ should parse Safari 7 Error.stack
  ✓ should parse Safari 8 Error.stack
  ✓ should parse nested eval() from Safari 9
  ✓ should parse Firefox 31 Error.stack

PhantomJS 2.1.1 (Linux 0.0.0): Executed 25 of 25 SUCCESS (0.028 secs / 0.032 secs) TOTAL: 25 SUCCESS

Done in 2.81s.

eriwen commented 2 years ago

I do not have any objections to using yarn for validation.

You can use a PR as well to test your change using GitHub actions now.

I'm going to close this for now in hopes that this is solved.