Skip to content

v0.18.0 postinstall missing dependencies #2142

Closed
@daltones

Description

@daltones

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
I think some dependencies are missing at the time when postinstall scripts are ran.

I'm having this error:

yarn install v0.18.0
info No lockfile found.
warning test: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/3] ⠐ gifsicle
[2/3] ⠐ jpegtran-bin
[3/3] ⠐ optipng-bin
[-/3] ⠐ waiting...
error [my-project]/node_modules/jpegtran-bin: Command failed.
Exit code: 1
Command: sh
Arguments: -c node lib/install.js
Directory: [my-project]/node_modules/jpegtran-bin
Output:
module.js:472
    throw err;
    ^

Error: Cannot find module 'ini'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> ([my-project]/node_modules/rc/lib/utils.js:3:12)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

In another project, after a yarn upgrade I also encountered this problem with other packages (gifsicle's postinstall missing deep-extend). So it seems like a general problem.

If the current behavior is a bug, please provide the steps to reproduce.
Given this package.json:

{
  "name": "test",
  "devDependencies": {
    "babel-cli": "^6.18.0",
    "gulp-imagemin": "^3.1.1"
  }
}

Run yarn install.

I noticed that if I try to install only one of these two, it will work. I guess that's an issue with shared dependencies between them.

What is the expected behavior?
Installation completes successful.

Please mention your node.js, yarn and operating system version.
node.js: v7.2.0
yarn: v0.18.0
OS: Arch Linux

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions