Skip to content

[BUG] When installing a git dependency, prepare script not running #1287

Closed
@OmgImAlexis

Description

@OmgImAlexis

What / Why

The prepare script isn't being run on install.

When

  • I try and install a package via Github(maybe just git?).

Where

  • npm 6.14.5 in Docker container.

How

Current Behavior

  • Package is installed and no dist directory is created.

Steps to Reproduce

This should end up with dist being shown in the ls.

  • mkdir x && cd x && npm init -y
  • npm i github:omgimalexis/execution-time -ddd
  • ls node_modules/execution-time/

This should end up with dist missing in the ls.

  • docker run -it mhart/alpine-node:12 sh
  • apk add --no-cache git
  • mkdir x && cd x && npm init -y
  • npm i github:omgimalexis/execution-time -ddd
  • ls node_modules/execution-time/

Expected Behavior

  • Package is installed, prepare script is run and dist directory is created.

Who

  • Not sure

References

Possibly related to #1229 or #1214

Both are running npm 6.14.5 and are on node 12.

Container silly logs
npm info it worked if it ends with ok
npm verb cli [
npm verb cli   '/usr/bin/node',
npm verb cli   '/usr/bin/npm',
npm verb cli   'i',
npm verb cli   'github:omgimalexis/execution-time',
npm verb cli   '-ddd'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session 669889f4035f14a2
npm sill install loadCurrentTree
npm sill install readLocalPackageData
npm verb prepareGitDep undefined: installing devDeps and running prepare script.
npm sill prepareGitDep 1> added 360 packages from 607 contributors and audited 361 packages in 13.774s
npm sill prepareGitDep 
npm sill prepareGitDep 22 packages are looking for funding
npm sill prepareGitDep   run `npm fund` for details
npm sill prepareGitDep 
npm sill prepareGitDep found 0 vulnerabilities
npm sill prepareGitDep 
npm sill prepareGitDep 
npm sill prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm sill prepareGitDep npm WARN lifecycle [email protected]~prepare: cannot run in wd [email protected] npm run build && npm run build:types (wd=/root/.npm/_cacache/tmp/git-clone-24b141d1)
npm sill prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm sill prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm sill prepareGitDep 
npm sill prepareGitDep 
npm info lifecycle [email protected]~prepack: [email protected]
npm info lifecycle [email protected]~postpack: [email protected]
npm sill pacote git manifest for undefined@github:omgimalexis/execution-time fetched in 17173ms
npm timing stage:loadCurrentTree Completed in 17238ms
npm sill install loadIdealTree
npm sill install cloneCurrentTreeToIdealTree
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 2ms
npm sill install loadShrinkwrap
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 6ms
npm sill install loadAllDepsIntoIdealTree
npm sill resolveWithNewModule [email protected] checking installable status
npm http fetch GET 304 https://registry.npmjs.org/pretty-hrtime 1475ms (from cache)
npm sill pacote range manifest for pretty-hrtime@^1.0.3 fetched in 1497ms
npm sill resolveWithNewModule [email protected] checking installable status
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1527ms
npm timing stage:loadIdealTree Completed in 1547ms
npm sill currentTree x
npm sill idealTree x
npm sill idealTree +-- [email protected]
npm sill idealTree `-- [email protected]
npm sill install generateActionsToTake
npm timing stage:generateActionsToTake Completed in 16ms
npm sill diffTrees action count 2
npm sill diffTrees add [email protected]
npm sill diffTrees add [email protected]
npm sill decomposeActions action count 16
npm sill decomposeActions fetch [email protected]
npm sill decomposeActions extract [email protected]
npm sill decomposeActions preinstall [email protected]
npm sill decomposeActions build [email protected]
npm sill decomposeActions install [email protected]
npm sill decomposeActions postinstall [email protected]
npm sill decomposeActions finalize [email protected]
npm sill decomposeActions refresh-package-json [email protected]
npm sill decomposeActions fetch [email protected]
npm sill decomposeActions extract [email protected]
npm sill decomposeActions preinstall [email protected]
npm sill decomposeActions build [email protected]
npm sill decomposeActions install [email protected]
npm sill decomposeActions postinstall [email protected]
npm sill decomposeActions finalize [email protected]
npm sill decomposeActions refresh-package-json [email protected]
npm sill install executeActions
npm sill doSerial global-install 16
npm verb correctMkdir /root/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /root/.npm/_locks/staging-7b45605da2f729b7.lock for /x/node_modules/.staging
npm sill doParallel extract 2
npm sill extract [email protected]
npm sill extract [email protected]
npm sill tarball trying pretty-hrtime@^1.0.3 by hash: sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=
npm sill tarball no local data for github:omgimalexis/execution-time. Extracting by manifest.
npm sill extract pretty-hrtime@^1.0.3 extracted to /x/node_modules/.staging/pretty-hrtime-1a8a1bc8 (56ms)
npm timing audit submit Completed in 852ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 856ms
npm timing audit body Completed in 5ms
npm verb prepareGitDep undefined: installing devDeps and running prepare script.
npm sill prepareGitDep 1> added 360 packages from 607 contributors and audited 361 packages in 13.692s
npm sill prepareGitDep 
npm sill prepareGitDep 22 packages are looking for funding
npm sill prepareGitDep   run `npm fund` for details
npm sill prepareGitDep 
npm sill prepareGitDep found 0 vulnerabilities
npm sill prepareGitDep 
npm sill prepareGitDep 
npm sill prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm sill prepareGitDep npm WARN lifecycle [email protected]~prepare: cannot run in wd [email protected] npm run build && npm run build:types (wd=/root/.npm/_cacache/tmp/git-clone-47a7314d)
npm sill prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm sill prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm sill prepareGitDep 
npm sill prepareGitDep 
npm info lifecycle [email protected]~prepack: [email protected]
npm info lifecycle [email protected]~postpack: [email protected]
npm sill extract github:omgimalexis/execution-time extracted to /x/node_modules/.staging/execution-time-7d4feac3 (16532ms)
npm timing action:extract Completed in 16550ms
npm sill doReverseSerial unbuild 16
npm sill doSerial remove 16
npm sill doSerial move 16
npm sill doSerial finalize 16
npm sill finalize /x/node_modules/pretty-hrtime
npm sill finalize /x/node_modules/execution-time
npm timing action:finalize Completed in 413ms
npm sill doParallel refresh-package-json 2
npm sill refresh-package-json /x/node_modules/pretty-hrtime
npm sill refresh-package-json /x/node_modules/execution-time
npm timing action:refresh-package-json Completed in 1014ms
npm sill doParallel preinstall 2
npm sill preinstall [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm sill preinstall [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing action:preinstall Completed in 26ms
npm sill doSerial build 16
npm sill build [email protected]
npm info linkStuff [email protected]
npm sill linkStuff [email protected] has /x/node_modules as its parent node_modules
npm sill build [email protected]
npm info linkStuff [email protected]
npm sill linkStuff [email protected] has /x/node_modules as its parent node_modules
npm timing action:build Completed in 21ms
npm sill doSerial global-link 16
npm sill doParallel update-linked 0
npm sill doSerial install 16
npm sill install [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm sill install [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm timing action:install Completed in 10ms
npm sill doSerial postinstall 16
npm sill postinstall [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm sill postinstall [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm timing action:postinstall Completed in 17ms
npm verb unlock done using /root/.npm/_locks/staging-7b45605da2f729b7.lock for /x/node_modules/.staging
npm timing stage:executeActions Completed in 18156ms
npm timing stage:rollbackFailedOptional Completed in 1ms
npm timing stage:runTopLevelLifecycles Completed in 37021ms
npm sill saveTree x
npm sill saveTree `-- [email protected]
npm sill saveTree   `-- [email protected]
npm sill install saveToDependencies
npm WARN saveError ENOENT: no such file or directory, open '/x/package.json'
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm notice created a lockfile as package-lock.json. You should commit this file.
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN enoent ENOENT: no such file or directory, open '/x/package.json'
npm verb enoent This is related to npm not being able to find a file.
npm verb enoent 
npm WARN x No description
npm WARN x No repository field.
npm WARN x No README data
npm WARN x No license field.

npm sill install printInstalled
+ [email protected]
added 2 packages from 2 contributors and audited 2 packages in 37.107s
found 0 vulnerabilities

npm verb exit [ 0, true ]
npm timing npm Completed in 37614ms
npm info ok 
Local silly logs
npm info it worked if it ends with ok
npm verb cli [
npm verb cli   '/usr/local/Cellar/node/12.5.0/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'i',
npm verb cli   'github:omgimalexis/execution-time#master',
npm verb cli   '-ddd'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session f08c3ccbb30d639c
npm sill install loadCurrentTree
npm sill install readLocalPackageData
npm sill pacote git manifest for undefined@github:omgimalexis/execution-time#master fetched in 606ms
npm timing stage:loadCurrentTree Completed in 684ms
npm sill install loadIdealTree
npm sill install cloneCurrentTreeToIdealTree
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
npm sill install loadShrinkwrap
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
npm sill install loadAllDepsIntoIdealTree
npm sill resolveWithNewModule [email protected] checking installable status
npm http fetch GET 304 https://registry.npmjs.org/pretty-hrtime 222ms (from cache)
npm sill pacote range manifest for pretty-hrtime@^1.0.3 fetched in 237ms
npm sill resolveWithNewModule [email protected] checking installable status
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 255ms
npm timing stage:loadIdealTree Completed in 263ms
npm sill currentTree [email protected]
npm sill idealTree [email protected]
npm sill idealTree ├── [email protected]
npm sill idealTree └── [email protected]
npm sill install generateActionsToTake
npm timing stage:generateActionsToTake Completed in 10ms
npm sill diffTrees action count 2
npm sill diffTrees add [email protected]
npm sill diffTrees add [email protected]
npm sill decomposeActions action count 16
npm sill decomposeActions fetch [email protected]
npm sill decomposeActions extract [email protected]
npm sill decomposeActions preinstall [email protected]
npm sill decomposeActions build [email protected]
npm sill decomposeActions install [email protected]
npm sill decomposeActions postinstall [email protected]
npm sill decomposeActions finalize [email protected]
npm sill decomposeActions refresh-package-json [email protected]
npm sill decomposeActions fetch [email protected]
npm sill decomposeActions extract [email protected]
npm sill decomposeActions preinstall [email protected]
npm sill decomposeActions build [email protected]
npm sill decomposeActions install [email protected]
npm sill decomposeActions postinstall [email protected]
npm sill decomposeActions finalize [email protected]
npm sill decomposeActions refresh-package-json [email protected]
npm sill install executeActions
npm sill doSerial global-install 16
npm verb correctMkdir /Users/xo/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /Users/xo/.npm/_locks/staging-c30d665adc7a651a.lock for /private/tmp/x/node_modules/.staging
npm sill doParallel extract 2
npm sill extract [email protected]
npm sill extract [email protected]
npm sill tarball trying pretty-hrtime@^1.0.3 by hash: sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=
npm sill tarball no local data for github:omgimalexis/execution-time#master. Extracting by manifest.
npm sill extract pretty-hrtime@^1.0.3 extracted to /private/tmp/x/node_modules/.staging/pretty-hrtime-783f1bdd (68ms)
npm sill extract github:omgimalexis/execution-time#master extracted to /private/tmp/x/node_modules/.staging/execution-time-979edb33 (71ms)
npm timing action:extract Completed in 77ms
npm sill doReverseSerial unbuild 16
npm sill doSerial remove 16
npm sill doSerial move 16
npm sill doSerial finalize 16
npm sill finalize /private/tmp/x/node_modules/pretty-hrtime
npm sill finalize /private/tmp/x/node_modules/execution-time
npm timing action:finalize Completed in 12ms
npm sill doParallel refresh-package-json 2
npm sill refresh-package-json /private/tmp/x/node_modules/pretty-hrtime
npm sill refresh-package-json /private/tmp/x/node_modules/execution-time
npm timing action:refresh-package-json Completed in 21ms
npm sill doParallel preinstall 2
npm sill preinstall [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm sill preinstall [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing action:preinstall Completed in 4ms
npm sill doSerial build 16
npm sill build [email protected]
npm info linkStuff [email protected]
npm sill linkStuff [email protected] has /private/tmp/x/node_modules as its parent node_modules
npm sill build [email protected]
npm info linkStuff [email protected]
npm sill linkStuff [email protected] has /private/tmp/x/node_modules as its parent node_modules
npm timing action:build Completed in 5ms
npm sill doSerial global-link 16
npm sill doParallel update-linked 0
npm sill doSerial install 16
npm sill install [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm sill install [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm timing action:install Completed in 2ms
npm sill doSerial postinstall 16
npm sill postinstall [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm sill postinstall [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm timing action:postinstall Completed in 2ms
npm verb unlock done using /Users/xo/.npm/_locks/staging-c30d665adc7a651a.lock for /private/tmp/x/node_modules/.staging
npm timing stage:executeActions Completed in 159ms
npm timing stage:rollbackFailedOptional Completed in 1ms
npm timing stage:runTopLevelLifecycles Completed in 1134ms
npm sill saveTree [email protected]
npm sill saveTree └─┬ [email protected]
npm sill saveTree   └── [email protected]
npm sill install saveToDependencies
npm verb saving [
npm verb saving   {
npm verb saving     name: 'execution-time',
npm verb saving     spec: 'github:omgimalexis/execution-time#master',
npm verb saving     save: 'dependencies'
npm verb saving   }
npm verb saving ]
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm notice created a lockfile as package-lock.json. You should commit this file.
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm sill install printInstalled
npm timing audit submit Completed in 920ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 919ms
npm timing audit body Completed in 1ms
+ [email protected]
added 2 packages from 2 contributors and audited 2 packages in 1.904s
found 0 vulnerabilities

npm verb exit [ 0, true ]
npm timing npm Completed in 2448ms
npm info ok 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingRelease 6.xwork is associated with a specific npm 6 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions