acrisci / simple-breakpad-server

Simple breakpad crash reports collecting server
https://www.npmjs.com/package/simple-breakpad-server
MIT License
67 stars 29 forks source link

npm install using the development tree fails. #24

Closed ewongbb closed 4 years ago

ewongbb commented 4 years ago

Hi, I cloned off the repo and ran 'npm install'. After a bit, it failed at:

simple-breakpad-server@1.0.0 prepublish /home/seabld/bp grunt coffee

/home/seabld/bp/node_modules/mkdirp/lib/opts-arg.js:7 opts = { mode: 0o777, fs, ...opts } ^^^

SyntaxError: Unexpected token ... at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:549:28) at Object.Module._extensions..js (module.js:586:10) at Module.load (/home/seabld/bp/node_modules/grunt/node_modules/coffeescript/lib/coffee-script/register.js:45:36) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.require (module.js:504:17) at require (internal/module.js:20:19) at Object. (/home/seabld/bp/node_modules/mkdirp/index.js:1:79) at Module._compile (module.js:577:32) at Object.Module._extensions..js (module.js:586:10) at Module.load (/home/seabld/bp/node_modules/grunt/node_modules/coffeescript/lib/coffee-script/register.js:45:36) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.require (module.js:504:17) at require (internal/module.js:20:19) at Object. (/home/seabld/bp/node_modules/grunt/lib/grunt/file.js:20:31) at Module._compile (module.js:577:32) at Object.Module._extensions..js (module.js:586:10) at Module.load (/home/seabld/bp/node_modules/grunt/node_modules/coffeescript/lib/coffee-script/register.js:45:36) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.require (module.js:504:17) at require (internal/module.js:20:19) at gRequire (/home/seabld/bp/node_modules/grunt/lib/grunt.js:14:24) at Object. (/home/seabld/bp/node_modules/grunt/lib/grunt.js:28:1) at Module._compile (module.js:577:32) at Object.Module._extensions..js (module.js:586:10) at Module.load (/home/seabld/bp/node_modules/coffee-script/lib/coffee-script/register.js:45:36) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.require (module.js:504:17) at require (internal/module.js:20:19) at Liftoff. (/home/seabld/bp/node_modules/grunt-cli/bin/grunt:65:19) at Liftoff.execute (/home/seabld/bp/node_modules/liftoff/index.js:203:12) at module.exports (/home/seabld/bp/node_modules/flagged-respawn/index.js:51:3) at Liftoff. (/home/seabld/bp/node_modules/liftoff/index.js:195:5) at Liftoff. (/home/seabld/bp/node_modules/liftoff/index.js:170:7) at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9)

I don't understand npm, grunt, nor coffee; but I do know a bit of js. I removed the extra ellipses (no idea where that came from), and ran 'npm install' again.

I also had to add 'grunt-shell': '^1.0.0' to the packages.json dev part.

Then it came to the following error:

` Running "coffee:glob_to_multiple" (coffee) task Warning: Unable to create directory "lib" (Error code: undefined). Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 3.10.0-1062.9.1.el7.x86_64 npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! node v6.17.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! simple-breakpad-server@1.0.0 prepublish: grunt coffee npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the simple-breakpad-server@1.0.0 prepublish script 'grunt coffee'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the simple-breakpad-server package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! grunt coffee npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs simple-breakpad-server npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls simple-breakpad-server npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: ` I'm not entirely sure where it's trying to create this lib dir.

The thing is,if I just went and 'npm install -g simple-breakpad-server', it installs and runs; but when I tried to use mysql dialect, it throws an error. (will file a new issue).

Jimbly commented 4 years ago

The ellipsis is the "spread" operator, requires a newer version of Javascript/Node, looks like mkdirp released a version that doesn't work on older Node versions :(.

As for making a lib folder, usually the build process builds the .js files into lib, so, it should be in the same directory you cloned the repo into, although possibly it's just erroring because something earlier failed, I don't actually know how the build process works here either ^_^.

Jimbly commented 4 years ago

We probably just need to pin to some older versions of some modules, and include a package-lock.json to avoid this in the future. Looks like I added one to my fork let me know if that one works for you =). They're pretty in sync, other than including a package-lock.json, I think...

Jimbly commented 4 years ago

From your error, it also looks like you're on Node v6, which is very old and has long since expired from long term support, the oldest Node version still in LTS is Node v10, with Node v12 the now oldest in "Active LTS".

Also, npm i installs the post-built .js files, doesn't go through the build process, so not surprising it would have fewer issues.

ewongbb commented 4 years ago

Hi Jimbly,

Thanks for the advice inhow to proceed forth. I'm on a CentOS 7.7 system, so I'm guessing I'll need to install a newer version somewhere else and refer to that instead.

ewongbb commented 4 years ago

Just removed the old nodejs package and installed nodesource's nodejs version and now npm install works.

Jimbly commented 4 years ago

Good to hear, glad to help!