question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install doesn't work, optimized-images-loader has outdated dependency

See original GitHub issue

Did you see the documentation relating to installation? Yes

Have you ensured the architecture and platform of Node.js used for npm install is the same as the architecture and platform of Node.js used at runtime? Yes

Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest? Yes

What is the complete output of running npm install --verbose sharp? Have you checked this output for useful error messages? npm timing build:link Completed in 32ms npm info run sharp@0.29.3 install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) npm info run sharp@0.25.4 install node_modules/optimized-images-loader/node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy) npm info run sharp@0.25.4 install { code: 1, signal: null } npm info run sharp@0.29.3 install { code: 1, signal: null } npm timing reify:rollback:createSparse Completed in 2279ms npm timing reify:rollback:retireShallow Completed in 0ms npm timing command:install Completed in 27050ms npm verb stack Error: command failed npm verb stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27) npm verb stack at ChildProcess.emit (node:events:390:28) npm verb stack at maybeClose (node:internal/child_process:1064:16) npm verb stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) npm verb pkgid sharp@0.25.4 npm verb cwd /home/hisashin/Projects/iprzygoda npm verb Linux 5.11.0-43-generic npm verb argv “/snap/node/5645/bin/node” “/usr/local/bin/npm” “install” “–verbose” “sharp” npm verb node v16.13.1 npm verb npm v8.3.0 npm ERR! code 1 npm ERR! path /home/hisashin/Projects/iprzygoda/node_modules/optimized-images-loader/node_modules/sharp npm ERR! command failed npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy) npm verb exit 1 npm timing npm Completed in 27248ms npm verb unfinished npm timer reify 1640884092066 npm verb unfinished npm timer reify:build 1640884116399 npm verb unfinished npm timer build 1640884116406 npm verb unfinished npm timer build:deps 1640884116406 npm verb unfinished npm timer build:run:install 1640884116491 npm verb unfinished npm timer build:run:install:node_modules/sharp 1640884116491 npm verb unfinished npm timer build:run:install:node_modules/optimized-images-loader/node_modules/sharp 1640884116538 npm verb code 1

npm ERR! A complete log of this run can be found in: npm ERR! /home/hisashin/.npm/_logs/2021-12-30T17_08_11_869Z-debug-0.log

What is the output of running npx envinfo --binaries --system? System: OS: Linux 5.11 elementary OS 6.1 Jólnir CPU: (16) x64 AMD Ryzen 7 1800X Eight-Core Processor Memory: 3.77 GB / 15.56 GB Container: Yes Shell: 5.8 - /usr/bin/zsh

After deleting node_modules and package-lock.json I get this error. npm ERR! code 1 npm ERR! path /home/hisashin/Projects/iprzygoda/node_modules/sharp npm ERR! command failed npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)

npm ERR! A complete log of this run can be found in: npm ERR! /home/hisashin/.npm/_logs/2021-12-30T17_05_55_233Z-debug-0.log

And the log is: 12178 verbose npm v8.3.0 12179 error code 1 12180 error path /home/hisashin/Projects/iprzygoda/node_modules/sharp 12181 error command failed 12182 error command sh -c (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy) 12183 verbose exit 1 12184 timing npm Completed in 90029ms 12185 verbose unfinished npm timer reify 1640883955418 12186 verbose unfinished npm timer reify:build 1640884042746 12187 verbose unfinished npm timer build 1640884042752 12188 verbose unfinished npm timer build:deps 1640884042753 12189 verbose unfinished npm timer build:run:install 1640884042839 12190 verbose unfinished npm timer build:run:install:node_modules/sharp 1640884042839 12191 verbose code 1 12192 error A complete log of this run can be found in: 12192 error /home/hisashin/.npm/_logs/2021-12-30T17_05_55_233Z-debug-0.log

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, Jan 3, 2022

Thanks, this says that the @aexol/next-js-starter project/app has a dependency on optimized-images-loader, which has an outdated dependency on sharp v0.25.4.

The issue I previously linked to at https://github.com/cyrilwanner/optimized-images-loader/issues/37 is probably what you need to get fixed.

If you’re using the --ignore-scripts flag, please ensure it is set to false i.e. --ignore-scripts=false.

1reaction
h1sashincommented, Jan 3, 2022
@aexol/next-js-starter@0.0.0 /home/hisashin/Projects/iprzygoda
└─┬ optimized-images-loader@0.4.0
  └── sharp@0.25.4

days after npm install --ignore-scripts it looks like this

Read more comments on GitHub >

github_iconTop Results From Across the Web

optimize-image-loader - npm
webpack loader for optimized, responsive images. Works with React, Vue, and all frontend setups.. Latest version: 0.0.5, last published: 5 ...
Read more >
How to Prevent Webpack Error after npm Install?
Seems like Webpack 3.4.1 is causing you troubles, because you are relying on some old dependencies. Do the following: npm uninstall webpack --save-dev....
Read more >
Gatsby Image
Speedy, optimized images without the work. gatsby-image is a React component specially designed to work seamlessly with Gatsby's GraphQL queries.
Read more >
file-loader - webpack - JS.ORG
The file-loader resolves import / require() on a file into a url and emits the file into the output directory. Getting Started. To...
Read more >
Run npm outdated to check old packages - DEV Community ‍ ‍
Here is the tip: run npm outdated from the terminal in your project folder to see if the installed packages are outdated. npm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found