tlawrence
tlawrence2w ago

Installing NPM Package

Am I able to use this NPM package within a node: https://github.com/postlight/parser, if so how would I go about installing it?
Solution:
Hi @dbrwk Its an issue with this Sharp library, use Jimp instead, please ref to this thread - https://discord.com/channels/853498675484819476/1262164579098558525/1286764593019879525
Jump to solution
6 Replies
AI Support
AI Support2w ago
AI Support Bot Information
<@838563076802347029> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
Gaurav Chadha
Gaurav Chadha2w ago
@tlawrence You can generate a node with AI for this https://docs.buildship.com/ai-nodes, you can import any pacakge using named import method, example: import module from "module-name"; & import Crypto from 'crypto';
Clinton
Clinton2w ago
I'm also struggling with the NPM import
dbrwk
dbrwk2w ago
@Gaurav Chadha i have similar issue. i tried to import sharp from 'sharp'; and got this error: Could not load the "sharp" module using the linux-x64 runtime Possible solutions: - Ensure optional dependencies can be installed: npm install --include=optional sharp - Ensure your package manager supports multi-platform installation: See https://sharp.pixelplumbing.com/install#cross-platform - Add platform-specific dependencies: npm install --os=linux --cpu=x64 sharp - Consult the installation documentation: See https://sharp.pixelplumbing.com/install
Solution
Gaurav Chadha
Gaurav Chadha2w ago
Hi @dbrwk Its an issue with this Sharp library, use Jimp instead, please ref to this thread - https://discord.com/channels/853498675484819476/1262164579098558525/1286764593019879525
dbrwk
dbrwk2w ago
@Gaurav Chadha thanks! yeah i found it, still have issue tho.