nathanhleung / install-peerdeps

πŸ’» A command-line interface to install an NPM package and its peer dependencies automatically.
https://www.npmjs.com/package/install-peerdeps
MIT License
296 stars 20 forks source link

`ERR undefined` with v3.0.3 install-peerdeps #193

Open richokorn opened 2 years ago

richokorn commented 2 years ago

As it says on the tin.

Attempted to run all five lines of @upleveled ESLint config, which begins with: CI=true npx install-peerdeps@latest --yarn --dev @upleveled/eslint-config-upleveled

Appears to run smoothly, and then thrown a cryptically short error: image

install-peerdeps v3.0.3
Installing peerdeps for @upleveled/eslint-config-upleveled@latest.
yarn add @upleveled/eslint-config-upleveled@2.4.9 @babel/eslint-parser@^7.17.0 @next/eslint-plugin-next@^12.1.0 @types/node@^17.0.18 @types/react@^17.0.39 @types/react-dom@^17.0.11 @typescript-eslint/eslint-plugin@^5.12.0 @typescript-eslint/parser@^5.12.0 @upleveled/eslint-plugin-upleveled@^2.1.2 eslint@^8.9.0 eslint-config-react-app@^7.0.0 eslint-import-resolver-typescript@^2.5.0 eslint-plugin-cypress@^2.12.1 eslint-plugin-flowtype@^8.0.3 eslint-plugin-import@^2.25.4 eslint-plugin-jest@^26.1.1 eslint-plugin-jsx-a11y@^6.5.1 eslint-plugin-react@^7.28.0 eslint-plugin-react-hooks@^4.3.0 eslint-plugin-security@^1.4.0 eslint-plugin-sonarjs@<1 eslint-plugin-testing-library@^5.0.5 eslint-plugin-unicorn@^41.0.0 typescript@^4.5.5 --dev  

ERR undefined

OS: Windows 10 Terminal: Hyper Editor: VSCode Framework: Nextjs

richokorn commented 2 years ago

If I change the version to be install-peerdeps@2, I receive a few deprecation warnings the first time around: CI=true npx install-peerdeps@2 --yarn --dev @upleveled/eslint-config-upleveled

First Install using `install-peerdeps@2` ``` npm WARN exec The following package was not found and will be installed: install-peerdeps@2 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. ``` ![image](https://user-images.githubusercontent.com/93930886/154960780-99afb70d-44da-49bb-a605-95030cf5216c.png) More lines follow, but appear to be quite functional.
Entirety has been added for posterity: ``` $ CI=true npx install-peerdeps@2 --yarn --dev @upleveled/eslint-config-upleveled npm WARN exec The following package was not found and will be installed: install-peerdeps@2 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. install-peerdeps v2.0.3 Installing peerdeps for @upleveled/eslint-config-upleveled@latest. yarn add @upleveled/eslint-config-upleveled@2.4.9 @babel/eslint-parser@^7.17.0 @next/eslint-plugin-next@^12.1.0 @types/node@^17.0.18 @types/react@^17.0.39 @types/react-dom@^17.0.11 @typescript-eslint/eslint-plugin@^5.12.0 @typescript-eslint/parser@^5.12.0 @upleveled/eslint-plugin-upleveled@^2.1.2 eslint@^8.9.0 eslint-config-react-app@^7.0.0 eslint-import-resolver-typescript@^2.5.0 eslint-plugin-cypress@^2.12.1 eslint-plugin-flowtype@^8.0.3 eslint-plugin-import@^2.25.4 eslint-plugin-jest@^26.1.1 eslint-plugin-jsx-a11y@^6.5.1 eslint-plugin-react@^7.28.0 eslint-plugin-react-hooks@^4.3.0 eslint-plugin-security@^1.4.0 eslint-plugin-sonarjs@0.12.0 eslint-plugin-testing-library@^5.0.5 eslint-plugin-unicorn@^41.0.0 typescript@^4.5.5 --dev --registry https://registry.npmjs.org yarn add v1.22.15 [1/4] Resolving packages... [2/4] Fetching packages... info @next/swc-android-arm64@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-android-arm64@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-android-arm64@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-darwin-arm64@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-darwin-arm64@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-darwin-arm64@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-darwin-x64@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-darwin-x64@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-arm-gnueabihf@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-arm-gnueabihf@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-arm-gnueabihf@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-linux-arm64-gnu@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-arm64-gnu@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-arm64-gnu@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-linux-arm64-musl@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-arm64-musl@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-arm64-musl@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-linux-x64-gnu@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-x64-gnu@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-x64-musl@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-x64-musl@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-win32-arm64-msvc@12.1.0: The CPU architecture "x64" is incompatible with this module. info "@next/swc-win32-arm64-msvc@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-win32-ia32-msvc@12.1.0: The CPU architecture "x64" is incompatible with this module. info "@next/swc-win32-ia32-msvc@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @babel/eslint-parser@7.17.0" has unmet peer dependency "@babel/core@>=7.11.0". warning " > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5". warning " > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9". [4/4] Building fresh packages... success Saved lockfile. success Saved 156 new dependencies. info Direct dependencies β”œβ”€ @babel/eslint-parser@7.17.0 β”œβ”€ @types/node@17.0.18 β”œβ”€ @types/react-dom@17.0.11 β”œβ”€ @types/react@17.0.39 β”œβ”€ @typescript-eslint/eslint-plugin@5.12.0 β”œβ”€ @upleveled/eslint-config-upleveled@2.4.9 β”œβ”€ @upleveled/eslint-plugin-upleveled@2.1.2 β”œβ”€ eslint-config-react-app@7.0.0 β”œβ”€ eslint-plugin-cypress@2.12.1 β”œβ”€ eslint-plugin-flowtype@8.0.3 β”œβ”€ eslint-plugin-jest@26.1.1 β”œβ”€ eslint-plugin-security@1.4.0 β”œβ”€ eslint-plugin-sonarjs@0.12.0 β”œβ”€ eslint-plugin-testing-library@5.0.5 β”œβ”€ eslint-plugin-unicorn@41.0.0 └─ typescript@4.5.5 info All dependencies β”œβ”€ @ampproject/remapping@2.1.2 β”œβ”€ @babel/code-frame@7.16.7 β”œβ”€ @babel/compat-data@7.17.0 β”œβ”€ @babel/eslint-parser@7.17.0 β”œβ”€ @babel/helper-builder-binary-assignment-operator-visitor@7.16.7 β”œβ”€ @babel/helper-compilation-targets@7.16.7 β”œβ”€ @babel/helper-explode-assignable-expression@7.16.7 β”œβ”€ @babel/helper-get-function-arity@7.16.7 β”œβ”€ @babel/helper-module-imports@7.16.7 β”œβ”€ @babel/helper-validator-identifier@7.16.7 β”œβ”€ @babel/helper-wrap-function@7.16.8 β”œβ”€ @babel/helpers@7.17.2 β”œβ”€ @babel/highlight@7.16.10 β”œβ”€ @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.16.7 β”œβ”€ @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.16.7 β”œβ”€ @babel/plugin-proposal-async-generator-functions@7.16.8 β”œβ”€ @babel/plugin-proposal-class-properties@7.16.7 β”œβ”€ @babel/plugin-proposal-class-static-block@7.16.7 β”œβ”€ @babel/plugin-proposal-decorators@7.17.2 β”œβ”€ @babel/plugin-proposal-dynamic-import@7.16.7 β”œβ”€ @babel/plugin-proposal-export-namespace-from@7.16.7 β”œβ”€ @babel/plugin-proposal-json-strings@7.16.7 β”œβ”€ @babel/plugin-proposal-logical-assignment-operators@7.16.7 β”œβ”€ @babel/plugin-proposal-nullish-coalescing-operator@7.16.7 β”œβ”€ @babel/plugin-proposal-numeric-separator@7.16.7 β”œβ”€ @babel/plugin-proposal-object-rest-spread@7.17.3 β”œβ”€ @babel/plugin-proposal-optional-catch-binding@7.16.7 β”œβ”€ @babel/plugin-proposal-private-methods@7.16.11 β”œβ”€ @babel/plugin-proposal-private-property-in-object@7.16.7 β”œβ”€ @babel/plugin-proposal-unicode-property-regex@7.16.7 β”œβ”€ @babel/plugin-syntax-class-properties@7.12.13 β”œβ”€ @babel/plugin-syntax-decorators@7.17.0 β”œβ”€ @babel/plugin-syntax-flow@7.16.7 β”œβ”€ @babel/plugin-syntax-jsx@7.16.7 β”œβ”€ @babel/plugin-syntax-top-level-await@7.14.5 β”œβ”€ @babel/plugin-syntax-typescript@7.16.7 β”œβ”€ @babel/plugin-transform-arrow-functions@7.16.7 β”œβ”€ @babel/plugin-transform-async-to-generator@7.16.8 β”œβ”€ @babel/plugin-transform-block-scoped-functions@7.16.7 β”œβ”€ @babel/plugin-transform-block-scoping@7.16.7 β”œβ”€ @babel/plugin-transform-classes@7.16.7 β”œβ”€ @babel/plugin-transform-computed-properties@7.16.7 β”œβ”€ @babel/plugin-transform-destructuring@7.17.3 β”œβ”€ @babel/plugin-transform-dotall-regex@7.16.7 β”œβ”€ @babel/plugin-transform-duplicate-keys@7.16.7 β”œβ”€ @babel/plugin-transform-exponentiation-operator@7.16.7 β”œβ”€ @babel/plugin-transform-flow-strip-types@7.16.7 β”œβ”€ @babel/plugin-transform-for-of@7.16.7 β”œβ”€ @babel/plugin-transform-function-name@7.16.7 β”œβ”€ @babel/plugin-transform-literals@7.16.7 β”œβ”€ @babel/plugin-transform-member-expression-literals@7.16.7 β”œβ”€ @babel/plugin-transform-modules-amd@7.16.7 β”œβ”€ @babel/plugin-transform-modules-commonjs@7.16.8 β”œβ”€ @babel/plugin-transform-modules-systemjs@7.16.7 β”œβ”€ @babel/plugin-transform-modules-umd@7.16.7 β”œβ”€ @babel/plugin-transform-named-capturing-groups-regex@7.16.8 β”œβ”€ @babel/plugin-transform-new-target@7.16.7 β”œβ”€ @babel/plugin-transform-object-super@7.16.7 β”œβ”€ @babel/plugin-transform-property-literals@7.16.7 β”œβ”€ @babel/plugin-transform-react-display-name@7.16.7 β”œβ”€ @babel/plugin-transform-react-jsx-development@7.16.7 β”œβ”€ @babel/plugin-transform-react-pure-annotations@7.16.7 β”œβ”€ @babel/plugin-transform-regenerator@7.16.7 β”œβ”€ @babel/plugin-transform-reserved-words@7.16.7 β”œβ”€ @babel/plugin-transform-runtime@7.17.0 β”œβ”€ @babel/plugin-transform-shorthand-properties@7.16.7 β”œβ”€ @babel/plugin-transform-spread@7.16.7 β”œβ”€ @babel/plugin-transform-sticky-regex@7.16.7 β”œβ”€ @babel/plugin-transform-template-literals@7.16.7 β”œβ”€ @babel/plugin-transform-typeof-symbol@7.16.7 β”œβ”€ @babel/plugin-transform-typescript@7.16.8 β”œβ”€ @babel/plugin-transform-unicode-escapes@7.16.7 β”œβ”€ @babel/plugin-transform-unicode-regex@7.16.7 β”œβ”€ @babel/preset-env@7.16.11 β”œβ”€ @babel/preset-modules@0.1.5 β”œβ”€ @babel/preset-react@7.16.7 β”œβ”€ @babel/preset-typescript@7.16.7 β”œβ”€ @babel/traverse@7.17.3 β”œβ”€ @jridgewell/resolve-uri@3.0.5 β”œβ”€ @jridgewell/sourcemap-codec@1.4.11 β”œβ”€ @jridgewell/trace-mapping@0.3.4 β”œβ”€ @types/json-schema@7.0.9 β”œβ”€ @types/node@17.0.18 β”œβ”€ @types/normalize-package-data@2.4.1 β”œβ”€ @types/parse-json@4.0.0 β”œβ”€ @types/prop-types@15.7.4 β”œβ”€ @types/react-dom@17.0.11 β”œβ”€ @types/react@17.0.39 β”œβ”€ @types/scheduler@0.16.2 β”œβ”€ @typescript-eslint/eslint-plugin@5.12.0 β”œβ”€ @typescript-eslint/experimental-utils@5.12.0 β”œβ”€ @typescript-eslint/type-utils@5.12.0 β”œβ”€ @typescript-eslint/utils@5.12.0 β”œβ”€ @upleveled/eslint-config-upleveled@2.4.9 β”œβ”€ @upleveled/eslint-plugin-upleveled@2.1.2 β”œβ”€ babel-plugin-macros@3.1.0 β”œβ”€ babel-plugin-transform-react-remove-prop-types@0.4.24 β”œβ”€ babel-preset-react-app@10.0.1 β”œβ”€ browserslist@4.19.3 β”œβ”€ builtin-modules@3.2.0 β”œβ”€ charcodes@0.2.0 β”œβ”€ ci-info@3.3.0 β”œβ”€ clean-regexp@1.0.0 β”œβ”€ confusing-browser-globals@1.0.11 β”œβ”€ convert-source-map@1.8.0 β”œβ”€ core-js-compat@3.21.1 β”œβ”€ cosmiconfig@7.0.1 β”œβ”€ csstype@3.0.10 β”œβ”€ electron-to-chromium@1.4.71 β”œβ”€ error-ex@1.3.2 β”œβ”€ escalade@3.1.1 β”œβ”€ eslint-config-react-app@7.0.0 β”œβ”€ eslint-plugin-cypress@2.12.1 β”œβ”€ eslint-plugin-flowtype@8.0.3 β”œβ”€ eslint-plugin-jest@26.1.1 β”œβ”€ eslint-plugin-security@1.4.0 β”œβ”€ eslint-plugin-sonarjs@0.12.0 β”œβ”€ eslint-plugin-testing-library@5.0.5 β”œβ”€ eslint-plugin-unicorn@41.0.0 β”œβ”€ gensync@1.0.0-beta.2 β”œβ”€ globals@11.12.0 β”œβ”€ hosted-git-info@2.8.9 β”œβ”€ indent-string@4.0.0 β”œβ”€ is-builtin-module@3.1.0 β”œβ”€ jsesc@2.5.2 β”œβ”€ json-parse-even-better-errors@2.3.1 β”œβ”€ lines-and-columns@1.2.4 β”œβ”€ lodash.debounce@4.0.8 β”œβ”€ min-indent@1.0.1 β”œβ”€ node-releases@2.0.2 β”œβ”€ normalize-package-data@2.5.0 β”œβ”€ path-exists@4.0.0 β”œβ”€ pluralize@8.0.0 β”œβ”€ read-pkg-up@7.0.1 ```

And then once more seems to have the deprecation warnings mysteriously disappear:

Second Install using `install-peerdeps@2` ``` $ CI=true npx install-peerdeps@2 --yarn --dev @upleveled/eslint-config-upleveled install-peerdeps v2.0.3 Installing peerdeps for @upleveled/eslint-config-upleveled@latest. yarn add @upleveled/eslint-config-upleveled@2.4.9 @babel/eslint-parser@^7.17.0 @next/eslint-plugin-next@^12.1.0 @types/node@^17.0.18 @types/react@^17.0.39 @types/react-dom@^17.0.11 @typescript-eslint/eslint-plugin@^5.12.0 @typescript-eslint/parser@^5.12.0 @upleveled/eslint-plugin-upleveled@^2.1.2 eslint@^8.9.0 eslint-config-react-app@^7.0.0 eslint-import-resolver-typescript@^2.5.0 eslint-plugin-cypress@^2.12.1 eslint-plugin-flowtype@^8.0.3 eslint-plugin-import@^2.25.4 eslint-plugin-jest@^26.1.1 eslint-plugin-jsx-a11y@^6.5.1 eslint-plugin-react@^7.28.0 eslint-plugin-react-hooks@^4.3.0 eslint-plugin-security@^1.4.0 eslint-plugin-sonarjs@0.12.0 eslint-plugin-testing-library@^5.0.5 eslint-plugin-unicorn@^41.0.0 typescript@^4.5.5 --dev --registry https://registry.npmjs.org yarn add v1.22.15 [1/4] Resolving packages... [2/4] Fetching packages... info @next/swc-android-arm64@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-android-arm64@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-android-arm64@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-darwin-arm64@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-darwin-arm64@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-darwin-arm64@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-darwin-x64@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-darwin-x64@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-arm-gnueabihf@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-arm-gnueabihf@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-arm-gnueabihf@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-linux-arm64-gnu@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-arm64-gnu@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-arm64-gnu@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-linux-arm64-musl@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-arm64-musl@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-arm64-musl@12.1.0: The CPU architecture "x64" is incompatible with this module. info @next/swc-linux-x64-gnu@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-x64-gnu@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/swc-linux-x64-musl@12.1.0: The platform "win32" is incompatible with this module. info "@next/swc-linux-x64-musl@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation.tion. info @next/swc-win32-arm64-msvc@12.1.0: The CPU architecture "x64" is incompatible with this module. lation. info "@next/swc-win32-arm64-msvc@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. ation. info @next/swc-win32-ia32-msvc@12.1.0: The CPU architecture "x64" is incompatible with this module. info "@next/swc-win32-ia32-msvc@12.1.0" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @babel/eslint-parser@7.17.0" has unmet peer dependency "@babel/core@>=7.11.0". warning " > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5". warning " > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9". [4/4] Building fresh packages... success Saved lockfile. success Saved 0 new dependencies. Done in 4.15s. SUCCESS @upleveled/eslint-config-upleveled and its peerDeps were installed successfully. ```
richokorn commented 2 years ago

Steps to reproduce original error:

  1. Create a fresh github repo, open Hyper and navigate to project folder of choice:
  2. Clone into repo as usual and run the following:
yarn create next-app .
yarn add sharp
  1. Run all 5 lines of @upleveled shared ESLint config . 3a. Modify first line to CI=true npx install-peerdeps@2 --yarn --dev @upleveled/eslint-config-upleveled to produce second "error" case.
OKostadinoska commented 2 years ago

Having exactly the same issue as @richokorn on Windows 11.

karlhorky commented 2 years ago

cc @nathanhleung a few different students using Windows have had this in our last cohorts, with different underlying errors. It seems something is undefined in install-peerdeps with Windows - unrelated to the actual error that happens from the command.