Coder Social home page Coder Social logo

Comments (4)

wraithgar avatar wraithgar commented on July 17, 2024 1

It's added automatically by npm during publish because it detects no existing install script but it finds a binding.gyp file. You can see an old issue where folks had similar problems here: #5234

from cli.

rigor789 avatar rigor789 commented on July 17, 2024

If it's helpful, here are the manifests before/after including fullMetadata: true

Without `fullMetadata: true`

{
  name: 'fsevents',
  version: '2.3.3',
  devDependencies: { 'node-gyp': '^9.4.0' },
  dist: {
    integrity: 'sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==',
    shasum: 'cac6407785d03675a2a5e1a5305c697b347d90d6',
    tarball: 'https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz',
    fileCount: 6,
    unpackedSize: 173224,
    signatures: [ [Object] ]
  },
  engines: { node: '^8.16.0 || ^10.6.0 || >=11.0.0' },
  os: [ 'darwin' ],
  hasInstallScript: true,
  _id: '[email protected]',
  _resolved: 'https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz',
  _from: 'fsevents@~2.3.2',
  _integrity: 'sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==',
  _signatures: [
    {
      keyid: 'SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA',
      sig: 'MEUCIBqKmzRJwFJcSLXc/SdNTdFsUQvsS/tX+pFHr2JkniDbAiEAiTjoxV3W2IK2g8Udbes/ZP46+TtL40PX3IX/bxosfWs='
    }
  ]
}

With `fullMetadata: true`

{
  name: 'fsevents',
  version: '2.3.3',
  description: 'Native Access to MacOS FSEvents',
  main: 'fsevents.js',
  types: 'fsevents.d.ts',
  os: [ 'darwin' ],
  engines: { node: '^8.16.0 || ^10.6.0 || >=11.0.0' },
  scripts: {
    clean: 'node-gyp clean && rm -f fsevents.node',
    build: 'node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean',
    test: '/bin/bash ./test.sh 2>/dev/null',
    prepublishOnly: 'npm run build',
    install: 'node-gyp rebuild'
  },
  repository: { type: 'git', url: 'git+https://github.com/fsevents/fsevents.git' },
  keywords: [ 'fsevents', 'mac' ],
  contributors: [
    { name: 'Philipp Dunkel', email: '[email protected]' },
    { name: 'Ben Noordhuis', email: '[email protected]' },
    { name: 'Elan Shankar', email: '[email protected]' },
    { name: 'Miroslav Bajtoš', email: '[email protected]' },
    { name: 'Paul Miller', url: 'https://paulmillr.com' }
  ],
  bugs: { url: 'https://github.com/fsevents/fsevents/issues' },
  homepage: 'https://github.com/fsevents/fsevents',
  devDependencies: { 'node-gyp': '^9.4.0' },
  gypfile: true,
  gitHead: '2db891e51aa0f2975c5eaaf6aa30f13d720a830a',
  _id: '[email protected]',
  _nodeVersion: '18.17.1',
  _npmVersion: '9.6.7',
  dist: {
    integrity: 'sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==',
    shasum: 'cac6407785d03675a2a5e1a5305c697b347d90d6',
    tarball: 'https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz',
    fileCount: 6,
    unpackedSize: 173224,
    signatures: [ [Object] ]
  },
  _npmUser: { name: 'pipobscure', email: '[email protected]' },
  directories: {},
  maintainers: [
    { name: 'pipobscure', email: '[email protected]' },
    { name: 'paulmillr', email: '[email protected]' }
  ],
  _npmOperationalInternal: {
    host: 's3://npm-registry-packages',
    tmp: 'tmp/fsevents_2.3.3_1692635062642_0.01197687980904627'
  },
  _hasShrinkwrap: false,
  _time: '2023-08-21T16:24:22.854Z',
  _resolved: 'https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz',
  _from: 'fsevents@~2.3.2',
  _integrity: 'sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==',
  _signatures: [
    {
      keyid: 'SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA',
      sig: 'MEUCIBqKmzRJwFJcSLXc/SdNTdFsUQvsS/tX+pFHr2JkniDbAiEAiTjoxV3W2IK2g8Udbes/ZP46+TtL40PX3IX/bxosfWs='
    }
  ]
}

from cli.

wraithgar avatar wraithgar commented on July 17, 2024

This appears to have been working by accident before. The minified packument does not have scripts which likely means that any package that required a build step would not work globally if we reverted that line.

This is still a bug, but the bug is that this should not be failing in global mode. Local mode gracefully catches this:

npm info run [email protected] install node_modules/fsevents node-gyp rebuild
npm info run [email protected] install { code: 1, signal: null }
npm verb reify failed optional dependency /Users/wraithgar/Development/npm/scratch/optional/node_modules/fsevents
npm info run [email protected] postinstall node_modules/nativescript node postinstall.js
npm info run [email protected] postinstall { code: 0, signal: null }

from cli.

rigor789 avatar rigor789 commented on July 17, 2024

Thanks for confirming, indeed that sounds more reasonable as an explanation - I wouldn't expect optional dependencies to fail a global install.

I do wonder when that install: 'node-gyp rebuild' is being added however, because it's not in the published package.json of fsevents:

"scripts": {
  "clean": "node-gyp clean && rm -f fsevents.node",
  "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean",
  "test": "/bin/bash ./test.sh 2>/dev/null",
  "prepublishOnly": "npm run build"
},

(from https://www.npmjs.com/package/fsevents?activeTab=code)

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.