Comments (14)
Did you try asarUnpack
? Please see #678 (comment)
npm verb stack TypeError: Cannot read properties of null (reading 'matches')
npm verb stack at Link.matches (C:\Users\86138\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\node.js:1115:41)
You might also be suffering from npm/cli#4367
from sharp.
I've added an Electron section to the docs with info about asarUnpack
as there have been a few questions relating to this recently - see commit 8cd8326
from sharp.
Did you try
asarUnpack
? Please see #678 (comment)npm verb stack TypeError: Cannot read properties of null (reading 'matches')
npm verb stack at Link.matches (C:\Users\86138\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\node.js:1115:41)You might also be suffering from npm/cli#4367
After adding to the asarUnpack
parameter, the same error message still appears
from sharp.
Please ensure both sharp
and the @img/
scoped packages are unpacked.
Lines 234 to 250 in 9bcf399
from sharp.
not works
I've used asarmor
to protect app.asar
file. I don't know if this is the reason
const asarmor = require('asarmor');
const { join } = require("path");
exports.default = async ({ appOutDir, packager }) => {
try {
const asarPath = join(packager.getResourcesDir(appOutDir), 'app.asar');
console.log(`asarmor applying patches to ${asarPath}`);
const archive = await asarmor.open(asarPath);
archive.patch(); // apply default patches
await archive.write(asarPath);
} catch (err) {
console.error(err);
}
};
from sharp.
The issue with asamor
has been resolved, and adding or not will result in an error message
from sharp.
You'll probably need to ask at the https://github.com/sleeyax/asarmor repo as I don't know anything about it.
from sharp.
Without using asarmor
the same error also occured.
from sharp.
If you still require help, the best thing to do is create a complete, minimal repo that allows someone else to reproduce.
from sharp.
https://github.com/ArSrNa/sharp-electron-test
from sharp.
Thank you, from a quick scan a few things stand out:
- Webpack is involved but
externals
doesn't appear to have been configured - please see https://sharp.pixelplumbing.com/install#webpack - pnpm is involved but
supportedArchitectures
doesn't appear to have been configured - please see https://sharp.pixelplumbing.com/install#cross-platform - There are two
package.json
files - please see https://electron-react-boilerplate.js.org/docs/adding-dependencies/#which-packagejson-file-to-use
from sharp.
errors still occured
ArSrNa/sharp-electron-test@567bbce
from sharp.
https://electron-react-boilerplate.js.org/docs/adding-dependencies/#which-packagejson-file-to-use suggests sharp
needs to be added to dependencies
of your release/app/package.json
file.
In addition, some of the scripts
are calling npm run...
directly, which means your pnpm
configuration might be ignored.
from sharp.
Move sharp
to 'release/app/package. json' and after reinstalling with NPM, Sharp can now run successfully. Thank you for your answer.
from sharp.
Related Issues (20)
- Usage of minSize in webp HOT 2
- Enhancement: add support for jpegli as jpeg encoder HOT 3
- Animated gif resizing discards per-frame background and transparency data HOT 1
- Can I use latest version sharp in Nodejs version 14.19.3 ? HOT 1
- Completely broken in latest version of debian HOT 1
- removing animation while uploading to s3 using sharp HOT 5
- Are there technical and/or licensing issues that require libvips to be shipped as separate library? HOT 2
- Is there another operation than composite to apply a highlighted rectangle to an image? HOT 2
- EPERM problem
- sharp is not compatible with the Node :- 17.9.1 NPM :- 8.11.0 HOT 2
- When you use sharp to convert svg to png, something is missing! HOT 2
- Using `clone` and `joinChannel` together apply channel operation to all output HOT 2
- Override HEIC output limitation HOT 1
- Support outputting higher bit-depth AVIF HOT 1
- Which is better between Sharp.metadata() vs fs.stat() to get image size HOT 1
- Keep only specified EXIF, IPTC, and XMP metadata tag values (similar to `withExifMerge`) HOT 2
- default `limitInputPixels` is not set correctly for jpeg input, avif output, yields `Error: Input image exceeds pixel limit` HOT 2
- sharp: Installation error: Prebuilt libvips 8.14.3 binaries are not yet available for win32-x64 HOT 2
- Using `npm install --cpu=x64 --os=win32` on `arm64/darwin` doesn't install the intended native module. HOT 3
- Google cloud storage integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharp.