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.

Install always failed when executing postinstall script in 1.1265.0

See original GitHub issue

Please make our job easier by filling this template out to completion. If you’re requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.

Description

Probably, this issue is a regression since there is no postinstall script in 1.1264.0 (https://github.com/wix/react-native-calendars/compare/1.1264.0...1.1265.0). Also, the scripts directory does not exist inside the node_modules package directory (see the image below).

Step to reproduce:

  • yarn add react-native-calendars

Expected Behavior

It should install the package successfully.

Observed Behavior

What actually happened when you performed the above actions?

  • Error while executing the postinstall script for react-native-calendars

If there’s an error message, please paste the full terminal output and error message in this code block:

error /home/jeffryangtoni/sources/company/github/district-bcd/packages/apps/shared/node_modules/react-native-calendars: Command failed.
Exit code: 1
Command: node ./scripts/postinstall.js
Arguments:
Directory: /home/jeffryangtoni/sources/company/github/district-bcd/packages/apps/shared/node_modules/react-native-calendars
Output:
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module '/home/jeffryangtoni/sources/company/github/district-bcd/packages/apps/shared/node_modules/react-native-calendars/scripts/postinstall.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'shared'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-calendars:
@company/district-bcd@ /home/jeffryangtoni/sources/company/github/district-bcd
└── (empty)
  • npm ls react-native:
@company/district-bcd@ /home/jeffryangtoni/sources/company/github/district-bcd
└── (empty)

Also specify:

  1. Device/emulator/simulator & OS version:

Samsung S9+ & Android 10

Reproducible Demo

Should be clear since it just only installing the npm package.

Screenshots

node_modules__react-native-calendars

scripts directory does not exist.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jeffryang24commented, Aug 24, 2021

@iamdainv , I think for your case, it will stick to version 1.1261.0. But, currently I will stick to 1.1264.0 for a while. 🙇

0reactions
jeffryang24commented, Aug 24, 2021

I see… seems it has been reported before… I will close this issue and will refer to the main issue. Thank you… 🙇

Read more comments on GitHub >

github_iconTop Results From Across the Web

Post-install script causes failures · Issue #1339 - GitHub
The issue is that you have a hacky post-install step in the package.json which errors depending on the scripting environment of the installer....
Read more >
Issues in npm post-install script - Stack Overflow
Everytime i try to install npm in project directory it shows following error. Running npm-postinstall.js child_process.js:669 throw err; ^ Error ...
Read more >
postinstall script fails when running `npm install` - Drupal
Failed at the barebones@1.0.0 postinstall script. Removing the "postinstall": "find node_modules/ -name '*. info' -type f -delete" step from ...
Read more >
Solved: Postinstall script - sh: command not found - 254800
The package extracts files to a folder then the postinstall script executes MMC_Install.sh to perform the install. I know MMC_Install.sh is ...
Read more >
@lavamoat/preinstall-always-fail - npm
Pre-Install Always Fail. Worried about accidentally running yarn or npm with script hooks enabled such as preinstall or postinstall ?
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