rugk / emoji-mart-embed

Uses Preact and remount to provide emoji-mart in plain JavaScript.
Other
5 stars 2 forks source link

Some license stuff executed at npm install #4

Open rugk opened 5 years ago

rugk commented 5 years ago

v1.1 of Awesome Emoji Picker shipped with this source code of this module:

awesome-emoji-picker-1.1-src.zip

Problem

On a clean clone

npm install resulted in this log:

 npm install 
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/remount-e22ca2ce/dist/remount.es5.js'
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/remount-e22ca2ce/dist/remount.es5.min.js'
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/npm-license-text-f14457a0/tsconfig.json'
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/remount-e22ca2ce/dist/remount.es6.js'
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/npm-license-text-f14457a0/tslint.json'
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/bluebird-a16a1a3d/js/browser/bluebird.min.js'
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/remount-e22ca2ce/dist/remount.es6.min.js'
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/remount-e22ca2ce/dist/remount.esm.min.mjs'
npm WARN tar ENOENT: no such file or directory, open '/home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/node_modules/.staging/remount-e22ca2ce/dist/remount.esm.mjs'
npm WARN emoji-mart-embed@1.0.0 No repository field.

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://github.com/mwittig/license-checker.git
npm ERR! 
npm ERR! fatal: Kein Git-Repository: /home/dev/Downloads/awesome-emoji-picker-1.1-src/emoji-mart-embed/../../../../.git/modules/src/popup/lib/awesome-emoji-emoji-mart-embed
npm ERR! 
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dev/.npm/_logs/2019-09-07T15_50_53_991Z-debug.log

Cause

Some license-checker npm module seems to do crazy stuff when being installed.

rugk commented 5 years ago

Another problem

When I use the latest version now (6fcc56f348a3d5f9ce1cfe3b21d770139e893aa5), I still get a strange error with the same module:

$ npm install
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/npm-license-crawler/license-checker@git+https:/github.com/mwittig/license-checker.git#d546e3f738e14c62e732346fa355162d46700893" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dev/.npm/_logs/2019-09-07T15_59_33_054Z-debug.log
rugk commented 5 years ago

The problem occurs in https://github.com/mwittig/license-checker (ping @mwittig), because npm-license-crawler pulls this as a dependency.

Also noticed the lib author we include to maybe switch to the maintained version, see https://github.com/mwittig/npm-license-crawler/issues/39.

rugk commented 5 years ago

Workaround

You can just remove npm-license-text. It's a dev dependency that is not required for building.

--- a/package.json
+++ b/package.json
@@ -22,7 +22,6 @@
     "babel-loader": "^8.0.5",
     "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
     "file-loader": "^3.0.1",
-    "npm-license-text": "^1.0.3",
     "webpack": "^4.31.0",
     "webpack-cli": "^3.3.2"
   }

It may also need to be removed from package-lock.json. (e.g. then update with npm update though that may change other dependencies of course)

rugk commented 5 years ago

Again reported at https://github.com/mwittig/npm-license-crawler/issues/40

For context: AMO reviewers noticed this build error when trying to reproduce the build.

Marking this as blocked by https://github.com/mwittig/npm-license-crawler/issues/40