-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cannot perform "npm i" due to detox postinstall #2389
Comments
So, what do you want from Detox project to do about your submodules? Shall I talk with somebody and convince them to exclude Detox from production dependencies and move it to development dependencies in their package manifest? |
Oh okay. As Detox is somehow breaking my install, I wanted to communicate this issue in order to find a solution. Honestly, I have no idea what detox is doing apart that it breaks the install. Maybe I am a bit foolish, but I look at the log and assume that the problem is somehow on the detox side. Recently I updated xCode to version 12, maybe it is related to that? There are several other issues referencing the detox postinstall.js, but they didnt provide a working solution in my case. |
Isn't it weird to expect from ancient detox@12 to compile with your fresh Xcode 12 provided Detox today is on 17th version counter, soon 18th? Why don't you use DETOX_DISABLE_POSTINSTALL=1 environment variable to mitigate the issue since you don't need Detox anyway at the moment? |
Well, that is indeed a bit weird. Just to have it mentioned, which I should have done in the entry-post. The problem is reproducable on my end when trying to install this fork of react-native-netinfo: However, I think its strange, that the issue doesnt exist, when installing the main repo of react-native-netinfo, eventhough they reference the same outdated detox library. I have seen this very issue on several forked packages, which require me to always reference the main repo in package.json and then copying by hand the forked repos that I require. Disabling detox postinstall is indeed a wokring solution for me. Could you please tell me where to put this flag: DETOX_DISABLE_POSTINSTALL=1 ? |
http://letmegooglethat.com/?q=setting+up+environment+variables+in+macOS |
@exotexot , You can either have Xcode 11.2.1 installed locally (use P.S. Just have re-checked your repo. You misled me. You DO have an outdated detox link:
|
I have NOT misled you. I never said I have a recent detox version whatsoever. Due to your information I understand the problem. However, why does the issue exist ONLY on forked repos https://github.com/BulletTrainHQ/react-native-netinfo/blob/master/package.json when package.json is identical to the main repo: https://github.com/react-native-community/react-native-netinfo/blob/master/package.json I can do npm i react-native-info just fine, but not npm i https://github.com/BulletTrainHQ/react-native-netinfo. Eventhough they BOTH reference the outdated detox@1.12. When trying to install the forked package, i get the error I mentioned in the introductory post. Dont get me wrong, I'm not here complaining, just trying to provide information to a problem that exists. |
@exotexot , of course you did:
Yet I see it in your package.json. As for:
I am not convinced. This can be due to the build caching Detox has. Try checking:
...and I'm 80% sure that you'll see the very same error on And next time please report issues in a less ambiguous fashion. Locking. |
I updated the pinned issue about "xCode" 12 support. Let's hope people read and stop posting the same thing over and over. Clearly search is very difficult for people. |
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > dtrace-provider@0.8.8 install /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/dtrace-provider
npm ERR! prepareGitDep > node-gyp rebuild || node suppress-error.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep ACTION binding_gyp_ndtp_target_build_ndtp .
npm ERR! prepareGitDep -----------------------------------------------------------------
npm ERR! prepareGitDep Building dtrace-provider failed with exit code 1, falling back
npm ERR! prepareGitDep on stub implementation.
npm ERR! prepareGitDep
npm ERR! prepareGitDep Re-run install with V set in your environment to see the build
npm ERR! prepareGitDep output, or NODE_DTRACE_PROVIDER_REQUIRE=hard to force an
npm ERR! prepareGitDep installation failure.
npm ERR! prepareGitDep -----------------------------------------------------------------
npm ERR! prepareGitDep TOUCH Release/obj.target/ndtp.stamp
npm ERR! prepareGitDep
npm ERR! prepareGitDep > fsevents@1.2.13 install /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/fsevents
npm ERR! prepareGitDep > node install.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep SOLINK_MODULE(target) Release/.node
npm ERR! prepareGitDep CXX(target) Release/obj.target/fse/fsevents.o
npm ERR! prepareGitDep SOLINK_MODULE(target) Release/fse.node
npm ERR! prepareGitDep
npm ERR! prepareGitDep > husky@2.7.0 install /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/husky
npm ERR! prepareGitDep > node husky install
npm ERR! prepareGitDep
npm ERR! prepareGitDep husky > Setting up git hooks
npm ERR! prepareGitDep husky > Done
npm ERR! prepareGitDep husky > Like husky? You can support the project on Patreon:
npm ERR! prepareGitDep husky > https://www.patreon.com/typicode 🐕
npm ERR! prepareGitDep
npm ERR! prepareGitDep > core-js@2.6.11 postinstall /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/core-js
npm ERR! prepareGitDep > node -e "try{require('./postinstall')}catch(e){}"
npm ERR! prepareGitDep
npm ERR! prepareGitDep Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
npm ERR! prepareGitDep
npm ERR! prepareGitDep The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
npm ERR! prepareGitDep > https://opencollective.com/core-js
npm ERR! prepareGitDep > https://www.patreon.com/zloirock
npm ERR! prepareGitDep
npm ERR! prepareGitDep Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > detox@12.11.3 postinstall /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox
npm ERR! prepareGitDep > node scripts/postinstall.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep /Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600 was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
npm ERR! prepareGitDep deleting /Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600 and trying to rebuild.
npm ERR! prepareGitDep Extracting Detox sources...
npm ERR! prepareGitDep Building Detox.framework from /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src...
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the
--dev
option is deprecated. Use--also=dev
instead.npm ERR! prepareGitDep npm WARN deprecated deep-assign@3.0.0: Check out
lodash.merge
ormerge-options
instead.npm ERR! prepareGitDep npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! prepareGitDep npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! prepareGitDep npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @Hapi organization and moving back to 'joi' (hapijs/joi#2411)
npm ERR! prepareGitDep npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! prepareGitDep npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! prepareGitDep npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm ERR! prepareGitDep npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained
npm ERR! prepareGitDep npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm ERR! prepareGitDep npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm ERR! prepareGitDep npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm ERR! prepareGitDep npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! prepareGitDep npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! prepareGitDep npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! prepareGitDep npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! prepareGitDep npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
npm ERR! prepareGitDep + xcodebuild -version
npm ERR! prepareGitDep +++ dirname /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/scripts/build_framework.ios.sh
npm ERR! prepareGitDep ++ dirname /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/scripts
npm ERR! prepareGitDep + detoxRootPath=/Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox
npm ERR! prepareGitDep ++ node -p 'require('''/Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/package.json''').version'
npm ERR! prepareGitDep + detoxVersion=12.11.3
npm ERR! prepareGitDep ++ echo 12.11.3
npm ERR! prepareGitDep ++ xcodebuild -version
npm ERR! prepareGitDep ++ shasum
npm ERR! prepareGitDep ++ awk '{print $1}'
npm ERR! prepareGitDep + sha1=628747b9018525dbdfbede9bffdea5a3f39c0600
npm ERR! prepareGitDep + detoxFrameworkDirPath=/Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600
npm ERR! prepareGitDep + detoxFrameworkPath=/Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600/Detox.framework
npm ERR! prepareGitDep + main
npm ERR! prepareGitDep + '[' -d /Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600 ']'
npm ERR! prepareGitDep + '[' '!' -d /Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600/Detox.framework ']'
npm ERR! prepareGitDep + echo '/Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600 was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
npm ERR! prepareGitDep deleting /Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600 and trying to rebuild.'
npm ERR! prepareGitDep + rm -rf /Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600
npm ERR! prepareGitDep + prepareAndBuildFramework
npm ERR! prepareGitDep + '[' -d /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios ']'
npm ERR! prepareGitDep + detoxSourcePath=/Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src
npm ERR! prepareGitDep + extractSources /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src
npm ERR! prepareGitDep + detoxSourcePath=/Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src
npm ERR! prepareGitDep + echo 'Extracting Detox sources...'
npm ERR! prepareGitDep + mkdir -p /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src
npm ERR! prepareGitDep + tar -xjf /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/Detox-ios-src.tbz -C /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src
npm ERR! prepareGitDep + buildFramework /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src
npm ERR! prepareGitDep + detoxSourcePath=/Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src
npm ERR! prepareGitDep + echo 'Building Detox.framework from /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src...'
npm ERR! prepareGitDep + mkdir -p /Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600
npm ERR! prepareGitDep + /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/scripts/build_universal_framework.sh /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/ios_src/Detox.xcodeproj /Users/vinzenz/Library/Detox/ios/628747b9018525dbdfbede9bffdea5a3f39c0600
npm ERR! prepareGitDep child_process.js:637
npm ERR! prepareGitDep throw err;
npm ERR! prepareGitDep ^
npm ERR! prepareGitDep
npm ERR! prepareGitDep Error: Command failed: /Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/scripts/build_framework.ios.sh
npm ERR! prepareGitDep at checkExecSyncError (child_process.js:616:11)
npm ERR! prepareGitDep at Object.execFileSync (child_process.js:634:15)
npm ERR! prepareGitDep at Object. (/Users/vinzenz/.npm/_cacache/tmp/git-clone-3fc1ec68/node_modules/detox/scripts/postinstall.js:2:27)
npm ERR! prepareGitDep at Module._compile (internal/modules/cjs/loader.js:1201:30)
npm ERR! prepareGitDep at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
npm ERR! prepareGitDep at Module.load (internal/modules/cjs/loader.js:1050:32)
npm ERR! prepareGitDep at Function.Module._load (internal/modules/cjs/loader.js:938:14)
npm ERR! prepareGitDep at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
npm ERR! prepareGitDep at internal/main/run_main_module.js:17:47 {
npm ERR! prepareGitDep status: 65,
npm ERR! prepareGitDep signal: null,
npm ERR! prepareGitDep output: [ null, null, null ],
npm ERR! prepareGitDep pid: 41688,
npm ERR! prepareGitDep stdout: null,
npm ERR! prepareGitDep stderr: null
npm ERR! prepareGitDep }
npm ERR! prepareGitDep npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"14.5.0","npm":"6.14.8"})
npm ERR! prepareGitDep npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
npm ERR! prepareGitDep npm WARN react-dom@16.13.1 requires a peer of react@^16.13.1 but none is installed. You must install peer dependencies yourself.
npm ERR! prepareGitDep npm WARN react-native-macos@0.60.0-microsoft.50 requires a peer of react@16.8.6 but none is installed. You must install peer dependencies yourself.
npm ERR! prepareGitDep npm WARN @react-native-community/cli@2.10.0 requires a peer of react-native@^0.60.0 but none is installed. You must install peer dependencies yourself.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! detox@12.11.3 postinstall:
node scripts/postinstall.js
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the detox@12.11.3 postinstall script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR! /Users/vinzenz/.npm/_logs/2020-10-05T10_07_35_156Z-debug.log
npm ERR! prepareGitDep
npm ERR! premature close
For a couple of days now I'm having massive problems performing an install of my project. It always fails with references to detox. I have not linked detox in my package.json but it appears that it is imported in various submodules.
The text was updated successfully, but these errors were encountered: