question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Post Install Script Fails in 7.2.0 version due to yarn dependency missing

See original GitHub issue

Post install script fails for 7.2.0 version. It uses yarn. Our source doesn’t use yarn to manage its dependencies. 7.1.1. didn’t have this script.

Console Output -

amplitude-js@7.2.0 postinstall /home/ubuntu/xxxxxxxxxx/node_modules/amplitude-js cd website/ && yarn install sh: 1: yarn: not found [?25l[[7m [27m[90m…[0m] \ postinstall: [32minfo[0m [35mlifecycle[0m amplitude-js@7.2.0~postinsta[0m[K] [37;40mnpm[0m [0m[31;40mERR![0m [0m[35mcode[0m ELIFECYCLE [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35msyscall[0m spawn [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35mfile[0m sh [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35merrno[0m ENOENT [0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m amplitude-js@7.2.0 postinstall: cd website/ && yarn install [0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m spawn ENOENT [0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m [0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m Failed at the amplitude-js@7.2.0 postinstall script. [0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m This is probably not a problem with npm. There is likely additional logging output above.

Expected Behavior

Backward compatibility. If yarn is not available use npm.

Current Behavior

Expects Clients to have yarn as a dependency to run its post install script.

Possible Solution

Not use yarn or use npm if yarn not available. Or add yarn as a dependency.

Steps to Reproduce

  1. Run post install script. Don’t have yarn as a package manager

Environment

Node

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jooohhncommented, Sep 22, 2020

Thanks for the notice guys. Should be fixed in 7.2.1 now.

1reaction
alyaptsevcommented, Sep 22, 2020

Is it really needed to install documentation dependencies if amplitude-js is transitive dependency?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress failed to start on Windows - Stack Overflow
→ Cypress Version: 1.4.1 Cypress failed to start. This is usually caused by a missing library or dependency. The error below should indicate...
Read more >
Error Codes | Yarn - Package Manager
This information message occurs when Yarn wishes to let you know that a package will need to be rebuilt in order for the...
Read more >
Yarn lock: how it works and what you risk without maintaining ...
It lists the versions of dependencies that are used at the time of the installation process. That means it looks into your package.json...
Read more >
you must install peer dependencies yourself Code Example
npm WARN codelyzer@6.0.1 requires a peer of tslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. typescript by devops ......
Read more >
Changelog - npm Docs
46a9bcbcb #3282 fix(docs): proper postinstall script file name (@KevinFCormier) ... fix error auditing package documents with missing dependencies ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found