phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.05k stars 7.09k forks source link

Support script postinstall step crashes dependency installation with Lerna and Dokku #5087

Closed nukeop closed 4 years ago

nukeop commented 4 years ago

Version

Description

I'm using lerna to manage dependencies in a monorepo. For deployment, I use dokku and scripts defined in package.json in the following way:

"scripts": {
    "postinstall": "lerna bootstrap",
    "build": "lerna run build",
    "start": "lerna run start",
    "test": "echo \"Error: no test specified\" && exit 1"
  }

Dokku runs npm install, then npm run build, and finally npm start on pushes. While npm install runs fine on my machine, it actually crashes when Phaser runs its postinstall step with node scripts/support.js.

There's npm fund for this kind of stuff and polluting install logs with donation messages is not allowed as per npm's Acceptable Use guidelines: https://www.npmjs.com/policies/open-source-terms#acceptable-use

These kinds of commercial content generally aren't acceptable:
[...]
2. Packages that display ads at runtime, on installation, or at other stages of the software development lifecycle, such as via npm scripts. 

Information on how to donate can be included in the documentation, according to the same guidelines:

These kinds of commercial content are generally acceptable in README files and other documentation:
[...]
2. Information on how to pay, donate to, and otherwise support Package development, Package developers, and Package steward organizations.

Can this script please be removed?

Install log:

lerna info Bootstrapping 2 packages                          
       lerna info Installing external dependencies                                                                                             lerna ERR! npm install exited 1 in '@giera/webapp'
       lerna ERR! npm install stdout:                                                                                                   
                                                                                                                                               > phaser@3.19.0 postinstall /tmp/build/packages/webapp/node_modules/phaser
       > node scripts/support.js                                                                                                        

       lerna ERR! npm install stderr:                                                                                                                                                                                                                                           
                                                                                                                                               lerna ERR! npm install exited 1

Additional Information

N/A

photonstorm commented 4 years ago

There was no such thing as npm fund when our postinstall script was created. It will be updated when I get around to it.