Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
OmgImAlexis opened this issue May 14, 2020 · 7 comments
Closed
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release

Comments

@OmgImAlexis
Copy link

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 npm@6.14.5
npm info using node@v12.16.3
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 execution-time@2.0.0~prepare: cannot run in wd execution-time@2.0.0 npm run build && npm run build:types (wd=/root/.npm/_cacache/tmp/git-clone-24b141d1)
npm sill prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm sill prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm sill prepareGitDep 
npm sill prepareGitDep 
npm info lifecycle execution-time@2.0.0~prepack: execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postpack: execution-time@2.0.0
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 execution-time@2.0.0 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 pretty-hrtime@1.0.3 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 +-- execution-time@2.0.0
npm sill idealTree `-- pretty-hrtime@1.0.3
npm sill install generateActionsToTake
npm timing stage:generateActionsToTake Completed in 16ms
npm sill diffTrees action count 2
npm sill diffTrees add pretty-hrtime@1.0.3
npm sill diffTrees add execution-time@2.0.0
npm sill decomposeActions action count 16
npm sill decomposeActions fetch pretty-hrtime@1.0.3
npm sill decomposeActions extract pretty-hrtime@1.0.3
npm sill decomposeActions preinstall pretty-hrtime@1.0.3
npm sill decomposeActions build pretty-hrtime@1.0.3
npm sill decomposeActions install pretty-hrtime@1.0.3
npm sill decomposeActions postinstall pretty-hrtime@1.0.3
npm sill decomposeActions finalize pretty-hrtime@1.0.3
npm sill decomposeActions refresh-package-json pretty-hrtime@1.0.3
npm sill decomposeActions fetch execution-time@2.0.0
npm sill decomposeActions extract execution-time@2.0.0
npm sill decomposeActions preinstall execution-time@2.0.0
npm sill decomposeActions build execution-time@2.0.0
npm sill decomposeActions install execution-time@2.0.0
npm sill decomposeActions postinstall execution-time@2.0.0
npm sill decomposeActions finalize execution-time@2.0.0
npm sill decomposeActions refresh-package-json execution-time@2.0.0
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 pretty-hrtime@1.0.3
npm sill extract execution-time@2.0.0
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 execution-time@2.0.0~prepare: cannot run in wd execution-time@2.0.0 npm run build && npm run build:types (wd=/root/.npm/_cacache/tmp/git-clone-47a7314d)
npm sill prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm sill prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm sill prepareGitDep 
npm sill prepareGitDep 
npm info lifecycle execution-time@2.0.0~prepack: execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postpack: execution-time@2.0.0
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 pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~preinstall: pretty-hrtime@1.0.3
npm sill preinstall execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~preinstall: execution-time@2.0.0
npm timing action:preinstall Completed in 26ms
npm sill doSerial build 16
npm sill build pretty-hrtime@1.0.3
npm info linkStuff pretty-hrtime@1.0.3
npm sill linkStuff pretty-hrtime@1.0.3 has /x/node_modules as its parent node_modules
npm sill build execution-time@2.0.0
npm info linkStuff execution-time@2.0.0
npm sill linkStuff execution-time@2.0.0 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 pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~install: pretty-hrtime@1.0.3
npm sill install execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~install: execution-time@2.0.0
npm timing action:install Completed in 10ms
npm sill doSerial postinstall 16
npm sill postinstall pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~postinstall: pretty-hrtime@1.0.3
npm sill postinstall execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postinstall: execution-time@2.0.0
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 `-- execution-time@2.0.0
npm sill saveTree   `-- pretty-hrtime@1.0.3
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
+ execution-time@2.0.0
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 npm@6.14.5
npm info using node@v12.5.0
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 execution-time@2.0.0 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 pretty-hrtime@1.0.3 checking installable status
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 255ms
npm timing stage:loadIdealTree Completed in 263ms
npm sill currentTree x@0.0.1
npm sill idealTree x@0.0.1
npm sill idealTree ├── execution-time@2.0.0
npm sill idealTree └── pretty-hrtime@1.0.3
npm sill install generateActionsToTake
npm timing stage:generateActionsToTake Completed in 10ms
npm sill diffTrees action count 2
npm sill diffTrees add pretty-hrtime@1.0.3
npm sill diffTrees add execution-time@2.0.0
npm sill decomposeActions action count 16
npm sill decomposeActions fetch pretty-hrtime@1.0.3
npm sill decomposeActions extract pretty-hrtime@1.0.3
npm sill decomposeActions preinstall pretty-hrtime@1.0.3
npm sill decomposeActions build pretty-hrtime@1.0.3
npm sill decomposeActions install pretty-hrtime@1.0.3
npm sill decomposeActions postinstall pretty-hrtime@1.0.3
npm sill decomposeActions finalize pretty-hrtime@1.0.3
npm sill decomposeActions refresh-package-json pretty-hrtime@1.0.3
npm sill decomposeActions fetch execution-time@2.0.0
npm sill decomposeActions extract execution-time@2.0.0
npm sill decomposeActions preinstall execution-time@2.0.0
npm sill decomposeActions build execution-time@2.0.0
npm sill decomposeActions install execution-time@2.0.0
npm sill decomposeActions postinstall execution-time@2.0.0
npm sill decomposeActions finalize execution-time@2.0.0
npm sill decomposeActions refresh-package-json execution-time@2.0.0
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 pretty-hrtime@1.0.3
npm sill extract execution-time@2.0.0
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 pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~preinstall: pretty-hrtime@1.0.3
npm sill preinstall execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~preinstall: execution-time@2.0.0
npm timing action:preinstall Completed in 4ms
npm sill doSerial build 16
npm sill build pretty-hrtime@1.0.3
npm info linkStuff pretty-hrtime@1.0.3
npm sill linkStuff pretty-hrtime@1.0.3 has /private/tmp/x/node_modules as its parent node_modules
npm sill build execution-time@2.0.0
npm info linkStuff execution-time@2.0.0
npm sill linkStuff execution-time@2.0.0 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 pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~install: pretty-hrtime@1.0.3
npm sill install execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~install: execution-time@2.0.0
npm timing action:install Completed in 2ms
npm sill doSerial postinstall 16
npm sill postinstall pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~postinstall: pretty-hrtime@1.0.3
npm sill postinstall execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postinstall: execution-time@2.0.0
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 x@0.0.1
npm sill saveTree └─┬ execution-time@2.0.0
npm sill saveTree   └── pretty-hrtime@1.0.3
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 x@0.0.1 No description
npm WARN x@0.0.1 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
+ execution-time@2.0.0
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 
@cinderblock
Copy link
Contributor

I think this is another manifestation of what happens when there is an .gitignore and no .npmignore.

From docs (I don't understand the reasoning behind this choice):

The .npmignore file works just like a .gitignore. If there is a .gitignore file, and .npmignore is missing, .gitignore’s contents will be used instead.

While you do seem to have a package.json#files, you list a directory, I think it's not quite sufficient.

From docs, emphasis mine:

Files included with the “package.json#files” field cannot be excluded through .npmignore or .gitignore.

Note it mentions "files" and not directories.


Fixes to try:

  • Change package.json#files
    • Specify all files from dist/ explicitly
    • Use wildcard that matches files
  • Add an empty .npmignore file

@OmgImAlexis
Copy link
Author

I’ll try those. Thank you.

@OmgImAlexis
Copy link
Author

OmgImAlexis commented May 30, 2020

Add an empty .npmignorefile
/x # npm i github:omgimalexis/execution-time -ddd
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 npm@6.14.5
npm info using node@v12.17.0
npm verb npm-session da65c0a3f830bc2d
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 7.348s
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 execution-time@2.0.0~prepare: cannot run in wd execution-time@2.0.0 npm run build && npm run build:types (wd=/root/.npm/_cacache/tmp/git-clone-e7adcf41)
npm sill prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm sill prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm sill prepareGitDep 
npm sill prepareGitDep 
npm info lifecycle execution-time@2.0.0~prepack: execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postpack: execution-time@2.0.0
npm sill pacote git manifest for undefined@github:omgimalexis/execution-time fetched in 9934ms
npm timing stage:loadCurrentTree Completed in 9966ms
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 1ms
npm sill install loadAllDepsIntoIdealTree
npm sill resolveWithNewModule execution-time@2.0.0 checking installable status
npm http fetch GET 200 https://registry.npmjs.org/pretty-hrtime 570ms
npm http fetch GET 200 https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz 11ms (from cache)
npm sill pacote range manifest for pretty-hrtime@^1.0.3 fetched in 597ms
npm sill resolveWithNewModule pretty-hrtime@1.0.3 checking installable status
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 609ms
npm timing stage:loadIdealTree Completed in 616ms
npm sill currentTree x@1.0.0
npm sill idealTree x@1.0.0
npm sill idealTree +-- execution-time@2.0.0
npm sill idealTree `-- pretty-hrtime@1.0.3
npm sill install generateActionsToTake
npm timing stage:generateActionsToTake Completed in 5ms
npm sill diffTrees action count 2
npm sill diffTrees add pretty-hrtime@1.0.3
npm sill diffTrees add execution-time@2.0.0
npm sill decomposeActions action count 16
npm sill decomposeActions fetch pretty-hrtime@1.0.3
npm sill decomposeActions extract pretty-hrtime@1.0.3
npm sill decomposeActions preinstall pretty-hrtime@1.0.3
npm sill decomposeActions build pretty-hrtime@1.0.3
npm sill decomposeActions install pretty-hrtime@1.0.3
npm sill decomposeActions postinstall pretty-hrtime@1.0.3
npm sill decomposeActions finalize pretty-hrtime@1.0.3
npm sill decomposeActions refresh-package-json pretty-hrtime@1.0.3
npm sill decomposeActions fetch execution-time@2.0.0
npm sill decomposeActions extract execution-time@2.0.0
npm sill decomposeActions preinstall execution-time@2.0.0
npm sill decomposeActions build execution-time@2.0.0
npm sill decomposeActions install execution-time@2.0.0
npm sill decomposeActions postinstall execution-time@2.0.0
npm sill decomposeActions finalize execution-time@2.0.0
npm sill decomposeActions refresh-package-json execution-time@2.0.0
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 pretty-hrtime@1.0.3
npm sill extract execution-time@2.0.0
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 (22ms)
npm timing audit submit Completed in 860ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 861ms
npm timing audit body Completed in 1ms
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 5.838s
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 execution-time@2.0.0~prepare: cannot run in wd execution-time@2.0.0 npm run build && npm run build:types (wd=/root/.npm/_cacache/tmp/git-clone-9c85d2d3)
npm sill prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm sill prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm sill prepareGitDep 
npm sill prepareGitDep 
npm info lifecycle execution-time@2.0.0~prepack: execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postpack: execution-time@2.0.0
npm sill extract github:omgimalexis/execution-time extracted to /x/node_modules/.staging/execution-time-7d4feac3 (7793ms)
npm timing action:extract Completed in 7799ms
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 197ms
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 242ms
npm sill doParallel preinstall 2
npm sill preinstall pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~preinstall: pretty-hrtime@1.0.3
npm sill preinstall execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~preinstall: execution-time@2.0.0
npm timing action:preinstall Completed in 2ms
npm sill doSerial build 16
npm sill build pretty-hrtime@1.0.3
npm info linkStuff pretty-hrtime@1.0.3
npm sill linkStuff pretty-hrtime@1.0.3 has /x/node_modules as its parent node_modules
npm sill build execution-time@2.0.0
npm info linkStuff execution-time@2.0.0
npm sill linkStuff execution-time@2.0.0 has /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 pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~install: pretty-hrtime@1.0.3
npm sill install execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~install: execution-time@2.0.0
npm timing action:install Completed in 5ms
npm sill doSerial postinstall 16
npm sill postinstall pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~postinstall: pretty-hrtime@1.0.3
npm sill postinstall execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postinstall: execution-time@2.0.0
npm timing action:postinstall Completed in 3ms
npm verb unlock done using /root/.npm/_locks/staging-7b45605da2f729b7.lock for /x/node_modules/.staging
npm timing stage:executeActions Completed in 8281ms
npm timing stage:rollbackFailedOptional Completed in 1ms
npm timing stage:runTopLevelLifecycles Completed in 18885ms
npm sill saveTree x@1.0.0
npm sill saveTree `-- execution-time@2.0.0
npm sill saveTree   `-- pretty-hrtime@1.0.3
npm sill install saveToDependencies
npm verb saving [
npm verb saving   {
npm verb saving     name: 'execution-time',
npm verb saving     spec: 'github:omgimalexis/execution-time',
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 x@1.0.0 No description
npm WARN x@1.0.0 No repository field.

npm sill install printInstalled
+ execution-time@2.0.0
added 2 packages from 2 contributors and audited 2 packages in 18.919s
found 0 vulnerabilities
npm notice 
npm notice 📦  execution-time@2.0.0
npm notice === Tarball Contents === 
npm notice 11.4kB LICENSE            
npm notice 1.6kB  dist/index.js      
npm notice 1.2kB  package.json       
npm notice 224B   dist/index.d.ts.map
npm notice 1.4kB  README.md          
npm notice 381B   dist/index.d.ts    
npm notice === Tarball Details === 
npm notice name:          execution-time                          
npm notice version:       2.0.0                                   
npm notice filename:      execution-time-2.0.0.tgz                
npm notice package size:  5.9 kB                                  
npm notice unpacked size: 16.0 kB                                 
npm notice shasum:        4738dc7c82abd971490afb68e5f8112051dae17b
npm notice integrity:     sha512-qv9VR5dQjqfrk[...]pzkbQOkEqb1+A==
npm notice total files:   6                                       
npm notice 
execution-time-2.0.0.tgz
Specify all files from dist/ explicitly
/x # npm i github:omgimalexis/execution-time -ddd
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 npm@6.14.5
npm info using node@v12.17.0
npm verb npm-session 3e6cbeffeef950bd
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 7.461s
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 execution-time@2.0.0~prepare: cannot run in wd execution-time@2.0.0 npm run build && npm run build:types (wd=/root/.npm/_cacache/tmp/git-clone-6d81e63b)
npm sill prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm sill prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm sill prepareGitDep 
npm sill prepareGitDep 
npm info lifecycle execution-time@2.0.0~prepack: execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postpack: execution-time@2.0.0
npm sill pacote git manifest for undefined@github:omgimalexis/execution-time fetched in 10104ms
npm timing stage:loadCurrentTree Completed in 10134ms
npm sill install loadIdealTree
npm sill install cloneCurrentTreeToIdealTree
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
npm sill install loadShrinkwrap
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
npm sill install loadAllDepsIntoIdealTree
npm sill resolveWithNewModule execution-time@2.0.0 checking installable status
npm http fetch GET 200 https://registry.npmjs.org/pretty-hrtime 1247ms
npm http fetch GET 200 https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz 9ms (from cache)
npm sill pacote range manifest for pretty-hrtime@^1.0.3 fetched in 1271ms
npm sill resolveWithNewModule pretty-hrtime@1.0.3 checking installable status
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1283ms
npm timing stage:loadIdealTree Completed in 1290ms
npm sill currentTree x@1.0.0
npm sill idealTree x@1.0.0
npm sill idealTree +-- execution-time@2.0.0
npm sill idealTree `-- pretty-hrtime@1.0.3
npm sill install generateActionsToTake
npm timing stage:generateActionsToTake Completed in 6ms
npm sill diffTrees action count 2
npm sill diffTrees add pretty-hrtime@1.0.3
npm sill diffTrees add execution-time@2.0.0
npm sill decomposeActions action count 16
npm sill decomposeActions fetch pretty-hrtime@1.0.3
npm sill decomposeActions extract pretty-hrtime@1.0.3
npm sill decomposeActions preinstall pretty-hrtime@1.0.3
npm sill decomposeActions build pretty-hrtime@1.0.3
npm sill decomposeActions install pretty-hrtime@1.0.3
npm sill decomposeActions postinstall pretty-hrtime@1.0.3
npm sill decomposeActions finalize pretty-hrtime@1.0.3
npm sill decomposeActions refresh-package-json pretty-hrtime@1.0.3
npm sill decomposeActions fetch execution-time@2.0.0
npm sill decomposeActions extract execution-time@2.0.0
npm sill decomposeActions preinstall execution-time@2.0.0
npm sill decomposeActions build execution-time@2.0.0
npm sill decomposeActions install execution-time@2.0.0
npm sill decomposeActions postinstall execution-time@2.0.0
npm sill decomposeActions finalize execution-time@2.0.0
npm sill decomposeActions refresh-package-json execution-time@2.0.0
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 pretty-hrtime@1.0.3
npm sill extract execution-time@2.0.0
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 (23ms)
npm timing audit submit Completed in 828ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 830ms
npm timing audit body Completed in 2ms
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 5.657s
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 execution-time@2.0.0~prepare: cannot run in wd execution-time@2.0.0 npm run build && npm run build:types (wd=/root/.npm/_cacache/tmp/git-clone-385d6173)
npm sill prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm sill prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm sill prepareGitDep 
npm sill prepareGitDep 
npm info lifecycle execution-time@2.0.0~prepack: execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postpack: execution-time@2.0.0
npm sill extract github:omgimalexis/execution-time extracted to /x/node_modules/.staging/execution-time-7d4feac3 (7591ms)
npm timing action:extract Completed in 7597ms
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 238ms
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 231ms
npm sill doParallel preinstall 2
npm sill preinstall pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~preinstall: pretty-hrtime@1.0.3
npm sill preinstall execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~preinstall: execution-time@2.0.0
npm timing action:preinstall Completed in 5ms
npm sill doSerial build 16
npm sill build pretty-hrtime@1.0.3
npm info linkStuff pretty-hrtime@1.0.3
npm sill linkStuff pretty-hrtime@1.0.3 has /x/node_modules as its parent node_modules
npm sill build execution-time@2.0.0
npm info linkStuff execution-time@2.0.0
npm sill linkStuff execution-time@2.0.0 has /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 pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~install: pretty-hrtime@1.0.3
npm sill install execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~install: execution-time@2.0.0
npm timing action:install Completed in 3ms
npm sill doSerial postinstall 16
npm sill postinstall pretty-hrtime@1.0.3
npm info lifecycle pretty-hrtime@1.0.3~postinstall: pretty-hrtime@1.0.3
npm sill postinstall execution-time@2.0.0
npm info lifecycle execution-time@2.0.0~postinstall: execution-time@2.0.0
npm timing action:postinstall Completed in 2ms
npm verb unlock done using /root/.npm/_locks/staging-7b45605da2f729b7.lock for /x/node_modules/.staging
npm timing stage:executeActions Completed in 8110ms
npm timing stage:rollbackFailedOptional Completed in 0ms
npm timing stage:runTopLevelLifecycles Completed in 19562ms
npm sill saveTree x@1.0.0
npm sill saveTree `-- execution-time@2.0.0
npm sill saveTree   `-- pretty-hrtime@1.0.3
npm sill install saveToDependencies
npm verb saving [
npm verb saving   {
npm verb saving     name: 'execution-time',
npm verb saving     spec: 'github:omgimalexis/execution-time',
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 x@1.0.0 No description
npm WARN x@1.0.0 No repository field.

npm sill install printInstalled
+ execution-time@2.0.0
added 2 packages from 2 contributors and audited 2 packages in 19.609s
found 0 vulnerabilities

npm verb exit [ 0, true ]
npm timing npm Completed in 19896ms
npm info ok 
npm notice 
npm notice 📦  execution-time@2.0.0
npm notice === Tarball Contents === 
npm notice 11.4kB LICENSE            
npm notice 1.6kB  dist/index.js      
npm notice 1.2kB  package.json       
npm notice 224B   dist/index.d.ts.map
npm notice 1.4kB  README.md          
npm notice 381B   dist/index.d.ts    
npm notice === Tarball Details === 
npm notice name:          execution-time                          
npm notice version:       2.0.0                                   
npm notice filename:      execution-time-2.0.0.tgz                
npm notice package size:  5.9 kB                                  
npm notice unpacked size: 16.1 kB                                 
npm notice shasum:        c4b2e9e891776396a0f3de30b65b625852d23c6e
npm notice integrity:     sha512-faqLo7GvlRItv[...]Z74+yBSJps6DQ==
npm notice total files:   6                                       
npm notice 
execution-time-2.0.0.tgz

@OmgImAlexis
Copy link
Author

@cinderblock didn't seem either of those helped.

@cinderblock
Copy link
Contributor

Oh well, worth a shot. I've seen that issue happen too many times.


I'm reading the logs and seeing a couple errors that stand out. I'm not sure what they mean exactly but are worth investigating I think:

ENOENT: no such file or directory, open '/x/package.json'

You might also try turning on verbose npm debugging in a .npmrc file so that any children are forced to run with the same verbosity. Might need to do it at the ~/.npmrc level since sub-folders don't seem to recurse up. echo loglevel=silly >> ~/.npmrc.

https://docs.npmjs.com/using-npm/config#loglevel

Alternatively, checking for any npm-debug.log files in the tree should work too.

@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

luin added a commit to slab/delta that referenced this issue Jun 14, 2021
davidisaaclee added a commit to davidisaaclee/matrix-js-sdk that referenced this issue Jan 1, 2023
davidisaaclee added a commit to davidisaaclee/matrix-js-sdk that referenced this issue Jan 1, 2023
blukat29 added a commit to blukat29/hardhat-utils that referenced this issue Mar 29, 2023
Added empty .npmigore for npm/cli#1287
@pcnova
Copy link

pcnova commented Nov 14, 2023

For anybody else running into this issue and finding this thread: forget about using prepare for installing from a URL like this. From my understanding, it's just not designed to work this way. Instead:

  1. manually prepare your package, e.g.: build it and create a .tgz tarball from it (using npm pack)
  2. upload the tarball to Github as a release asset
  3. use the tarball's URL for installing with NPM

This does mean you're essentially pinned to the tarball's version, since NPM does not allow using a #semver range with tarball URLs... c'est la vie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release
Projects
None yet
Development

No branches or pull requests

4 participants