RaisinTen / electron-snapshot-experiment

Speeding up Electron apps by using V8 snapshots in the main process
58 stars 5 forks source link

yarn error #2

Closed hushizhi closed 1 week ago

hushizhi commented 1 week ago

(base) ➜ electron-snapshot-experiment git:(main) ✗ yarn install yarn install v1.22.19 warning ../../package.json: No license field [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... error An unexpected error occurred: "https://registry.yarnpkg.com/@postman/app-logger/-/app-logger-2.0.0.tgz: Request failed \"404 Not Found\"". info If you think this is a bug, please open a bug report with the information provided in "/Users/xxx/xxx/electron-snapshot-experiment/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

RaisinTen commented 1 week ago

Thanks for reporting the issue! That module belongs to a private npm organization, that's why I can access it and others outside the org cannot. This module can be assumed to be an equivalent of the winston module which is public: https://www.npmjs.com/package/winston.

hushizhi commented 1 week ago

then show error info: Error: Patch file found for package app-updater which is not present at node_modules/@postman/app-updater

ERROR Failed to apply patch for package logform at path

(base) ➜ electron-snapshot-experiment git:(main) ✗ yarn add winston yarn add v1.22.19 warning ../../package.json: No license field info No lockfile found. [1/4] 🔍 Resolving packages... warning circular-json@0.3.0: CircularJSON is in maintenance only, flatted is its successor. warning electron-json-storage > rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported warning electron-json-storage > rimraf > glob@7.2.3: Glob versions prior to v9 are no longer supported warning electron-json-storage > rimraf > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. warning serialised-error > 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. warning shelljs > glob@7.2.3: Glob versions prior to v9 are no longer supported warning uuid@3.3.2: 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. warning electron-mksnapshot > temp > rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported warning electron-mksnapshot > temp > rimraf > glob@7.2.3: Glob versions prior to v9 are no longer supported warning patch-package > rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... success Saved lockfile. success Saved 195 new dependencies. info Direct dependencies ├─ @electron/fuses@1.8.0 ├─ @raisinten/aes-crypto-js@0.0.2 ├─ @sentry/node@4.4.1 ├─ async@1.5.2 ├─ circular-json@0.3.0 ├─ electron-json-storage@4.5.0 ├─ electron-link@0.6.0 ├─ electron-mksnapshot@28.3.1 ├─ electron@28.3.1 ├─ i18next@23.5.1 ├─ lodash@4.17.21 ├─ nedb@1.8.0 ├─ node-forge@0.10.0 ├─ node-ipc@9.1.1 ├─ patch-package@8.0.0 ├─ perftrace@1.2.1 ├─ semver@5.5.1 ├─ serialised-error@1.1.3 ├─ shelljs@0.8.4 ├─ sudo-prompt@9.2.1 ├─ uuid@3.3.2 ├─ winston@3.14.2 └─ ws@8.9.0 info All dependencies ├─ @babel/runtime@7.25.6 ├─ @colors/colors@1.6.0 ├─ @dabh/diagnostics@2.0.3 ├─ @electron/fuses@1.8.0 ├─ @electron/get@2.0.3 ├─ @raisinten/aes-crypto-js@0.0.2 ├─ @sentry/core@4.4.1 ├─ @sentry/minimal@4.4.1 ├─ @sentry/node@4.4.1 ├─ @sindresorhus/is@4.6.0 ├─ @szmarczak/http-timer@4.0.6 ├─ @types/cacheable-request@6.0.3 ├─ @types/http-cache-semantics@4.0.4 ├─ @types/keyv@3.1.4 ├─ @types/stack-trace@0.0.29 ├─ @types/triple-beam@1.3.5 ├─ @types/yauzl@2.10.3 ├─ @yarnpkg/lockfile@1.1.0 ├─ acorn@8.12.1 ├─ agent-base@4.3.0 ├─ ansi-styles@4.3.0 ├─ ast-types@0.14.1 ├─ ast-util-plus@0.7.1 ├─ async@1.5.2 ├─ at-least-node@1.0.0 ├─ balanced-match@1.0.2 ├─ base64-js@1.5.1 ├─ binary-search-tree@0.2.5 ├─ brace-expansion@1.1.11 ├─ braces@3.0.3 ├─ buffer-crc32@0.2.13 ├─ buffer@5.7.1 ├─ cacheable-lookup@5.0.4 ├─ cacheable-request@7.0.4 ├─ call-bind@1.0.7 ├─ chalk@4.1.2 ├─ ci-info@3.9.0 ├─ circular-json@0.3.0 ├─ clone-response@1.0.3 ├─ color-convert@2.0.1 ├─ color-name@1.1.4 ├─ color-string@1.9.1 ├─ color@3.2.1 ├─ colorspace@1.1.4 ├─ concat-map@0.0.1 ├─ cookie@0.3.1 ├─ cross-spawn@7.0.3 ├─ debug@4.3.7 ├─ decompress-response@6.0.0 ├─ defer-to-connect@2.0.1 ├─ deferred-leveldown@5.3.0 ├─ define-data-property@1.1.4 ├─ define-properties@1.2.1 ├─ detect-node@2.1.0 ├─ easy-stack@1.0.1 ├─ electron-json-storage@4.5.0 ├─ electron-link@0.6.0 ├─ electron-mksnapshot@28.3.1 ├─ electron@28.3.1 ├─ enabled@2.0.0 ├─ encoding-down@6.3.0 ├─ end-of-stream@1.4.4 ├─ env-paths@2.2.1 ├─ errno@0.1.8 ├─ es-define-property@1.0.0 ├─ es6-error@4.1.1 ├─ es6-promise@4.2.8 ├─ es6-promisify@5.0.0 ├─ escape-string-regexp@4.0.0 ├─ esprima@4.0.1 ├─ event-pubsub@4.3.0 ├─ extract-zip@2.0.1 ├─ fd-slicer@1.1.0 ├─ fecha@4.2.3 ├─ fill-range@7.1.1 ├─ find-yarn-workspace-root@2.0.0 ├─ fn.name@1.1.0 ├─ fs-extra@9.1.0 ├─ fs.realpath@1.0.0 ├─ global-agent@3.0.0 ├─ globalthis@1.0.4 ├─ gopd@1.0.1 ├─ got@11.8.6 ├─ has-flag@4.0.0 ├─ has-property-descriptors@1.0.2 ├─ has-proto@1.0.3 ├─ has-symbols@1.0.3 ├─ hasown@2.0.2 ├─ http-cache-semantics@4.1.1 ├─ http2-wrapper@1.0.3 ├─ https-proxy-agent@2.2.4 ├─ i18next@23.5.1 ├─ ieee754@1.2.1 ├─ imurmurhash@0.1.4 ├─ indent-string@4.0.0 ├─ inflight@1.0.6 ├─ interpret@1.4.0 ├─ is-arrayish@0.3.2 ├─ is-core-module@2.15.1 ├─ is-number@7.0.0 ├─ is-stream@2.0.1 ├─ is-wsl@2.2.0 ├─ isarray@2.0.5 ├─ isexe@2.0.0 ├─ js-message@1.0.5 ├─ js-queue@2.0.0 ├─ json-buffer@3.0.1 ├─ json-stable-stringify@1.1.1 ├─ json-stringify-safe@5.0.1 ├─ jsonify@0.0.1 ├─ keyv@4.5.4 ├─ klaw-sync@6.0.0 ├─ kuler@2.0.0 ├─ level-codec@9.0.2 ├─ level-errors@2.0.1 ├─ level-iterator-stream@4.0.2 ├─ leveldown@5.6.0 ├─ levelup@4.4.0 ├─ lie@3.1.1 ├─ localforage@1.10.0 ├─ lockfile@1.0.4 ├─ lodash@4.17.21 ├─ logform@2.6.1 ├─ lsmod@1.0.0 ├─ matcher@3.0.0 ├─ micromatch@4.0.8 ├─ mimic-response@3.1.0 ├─ minimatch@3.1.2 ├─ mkdirp@0.5.6 ├─ napi-macros@2.0.0 ├─ nedb@1.8.0 ├─ node-forge@0.10.0 ├─ node-gyp-build@4.1.1 ├─ node-ipc@9.1.1 ├─ normalize-url@6.1.0 ├─ object-hash@1.3.1 ├─ object-keys@1.1.1 ├─ one-time@1.0.0 ├─ open@7.4.2 ├─ os-tmpdir@1.0.2 ├─ p-cancelable@2.1.1 ├─ patch-package@8.0.0 ├─ path-is-absolute@1.0.1 ├─ path-key@3.1.1 ├─ path-parse@1.0.7 ├─ pend@1.2.0 ├─ perftrace@1.2.1 ├─ picomatch@2.3.1 ├─ private@0.1.8 ├─ progress@2.0.3 ├─ prr@1.0.1 ├─ pump@3.0.0 ├─ quick-lru@5.1.1 ├─ readable-stream@3.6.2 ├─ recast@0.20.5 ├─ rechoir@0.6.2 ├─ regenerator-runtime@0.14.1 ├─ resolve-alpn@1.2.1 ├─ resolve@1.22.8 ├─ rimraf@2.7.1 ├─ roarr@2.15.4 ├─ safe-buffer@5.2.1 ├─ semver-compare@1.0.0 ├─ semver@5.5.1 ├─ serialised-error@1.1.3 ├─ serialize-error@7.0.1 ├─ set-function-length@1.2.2 ├─ shebang-command@2.0.0 ├─ shebang-regex@3.0.0 ├─ shelljs@0.8.4 ├─ simple-swizzle@0.2.2 ├─ slash@2.0.0 ├─ source-map@0.7.4 ├─ sprintf-js@1.1.3 ├─ stack-trace@0.0.10 ├─ string_decoder@1.3.0 ├─ sudo-prompt@9.2.1 ├─ sumchecker@3.0.1 ├─ supports-color@7.2.0 ├─ supports-preserve-symlinks-flag@1.0.0 ├─ temp@0.8.4 ├─ text-hex@1.0.0 ├─ tmp@0.0.33 ├─ to-regex-range@5.0.1 ├─ type-fest@0.13.1 ├─ undici-types@6.19.8 ├─ util-deprecate@1.0.2 ├─ uuid@3.3.2 ├─ which@2.0.2 ├─ winston-transport@4.7.1 ├─ winston@3.14.2 ├─ write-file-atomic@2.4.3 ├─ ws@8.9.0 ├─ yaml@2.5.1 └─ yauzl@2.10.0 $ patch-package patch-package 8.0.0 Applying patches... @raisinten/aes-crypto-js@0.0.2 ✔ @sentry/node@4.4.1 ✔ agent-base@4.3.0 ✔ binary-search-tree@0.2.5 ✔ electron-json-storage@4.5.0 ✔ glob@7.2.3 ✔ https-proxy-agent@2.2.4 ✔ inherits@2.0.4 ✔ lockfile@1.0.4 ✔ lsmod@1.0.0 ✔ minimatch@3.1.2 ✔ nedb@1.8.0 ✔ node-forge@0.10.0 ✔ node-ipc@9.1.1 ✔ object-hash@1.3.1 ✔ shelljs@0.8.4 ✔ signal-exit@3.0.7 ✔ sudo-prompt@9.2.1 ✔ winston-transport@4.7.1 ✔ write-file-atomic@2.4.3 ✔ ws@8.9.0 ✔ Error: Patch file found for package app-updater which is not present at node_modules/@postman/app-updater

ERROR Failed to apply patch for package logform at path

node_modules/logform

This error was caused because logform has changed since you made the patch file for it. This introduced conflicts with your patch, just like a merge conflict in Git when separate incompatible changes are made to the same piece of code.

Maybe this means your patch file is no longer necessary, in which case hooray! Just delete it!

Otherwise, you need to generate a new patch file.

To generate a new one, just repeat the steps you made to generate the first one.

i.e. manually make the appropriate file changes, then run

patch-package logform

Info: Patch file: patches/logform+1.10.0.patch Patch was made for version: 1.10.0 Installed version: 2.6.1

ERROR Failed to apply patch for package winston at path

node_modules/winston

This error was caused because winston has changed since you made the patch file for it. This introduced conflicts with your patch, just like a merge conflict in Git when separate incompatible changes are made to the same piece of code.

Maybe this means your patch file is no longer necessary, in which case hooray! Just delete it!

Otherwise, you need to generate a new patch file.

To generate a new one, just repeat the steps you made to generate the first one.

i.e. manually make the appropriate file changes, then run

patch-package winston

Info: Patch file: patches/winston+3.1.0.patch Patch was made for version: 3.1.0 Installed version: 3.14.2


patch-package finished with 3 error(s). ✨ Done in 64.57s.

RaisinTen commented 1 week ago

@hushizhi I have sent a PR to fix this problem: https://github.com/RaisinTen/electron-snapshot-experiment/pull/3. Feel free to create more issues if you face any problem after pulling in the latest changes!