Can we access tarball in postpack while doing npm publish

(Abhishek) #1

I am trying to modify the package.json to remove un-necessary script/ devDependencies from it before publishing it as a package on npm. I am using postpack to run my script, which does this. But, I get no such file or directory error while accessing the tar file in postpack. It is also not clear in docs that postpack, when called through npm publish, will have access to the tarball or not.

npm --versions

  temp: '1.0.0',
  npm: '6.9.0',
  ares: '1.15.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.34.0',
  node: '10.15.1',
  openssl: '1.1.0j',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '',
  zlib: '1.2.11'