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.

Loader does not detect optimization packages.

See original GitHub issue

When running either in dev mode or running a build the library does not appear to find image optimization libraries in spite of them being installed.

➜  landing-site git:(master) ✗ yarn run dev
yarn run v1.17.0
$ ts-node server.ts
next-optimized-images ❯ WARNING!
next-optimized-images ❯ No package found which can optimize images.
next-optimized-images ❯ Starting from version 2 of next-optimized-images, all optimization is optional and you can choose which ones you want to use.
next-optimized-images ❯ For help during the setup and installation, please read https://github.com/cyrilwanner/next-optimized-images#optimization-packages

next-optimized-images ❯ If you recently updated from v1 to v2, please read https://github.com/cyrilwanner/next-optimized-images/blob/master/UPGRADING.md
next-optimized-images ❯ If this is on purpose and you don't want this plugin to optimize the images, set the option `optimizeImages: false` to hide this warning.

Package File:

{
  "scripts": {
    "dev": "ts-node server.ts",
    "build": "next build",
    "start": "ts-node server.ts",
    "storybook": "start-storybook -p 6006 -c .storybook -s .",
    "storybook-nobrowser": "start-storybook --ci -p 6006 -c .storybook -s .",
    "build-storybook": "build-storybook -c .storybook -o build-storybook; cp -R static/* build-storybook/static",
    "start-storybook": "ts-node server-storybook.ts"
  },
  "dependencies": {
    "@babel/core": "^7.4.3",
    "@fortawesome/fontawesome-svg-core": "^1.2.17",
    "@fortawesome/free-solid-svg-icons": "^5.8.1",
    "@fortawesome/react-fontawesome": "^0.1.4",
    "@storybook/addon-actions": "^5.0.10",
    "@storybook/react": "^5.0.10",
    "@storybook/theming": "^5.0.11",
    "@tryghost/content-api": "^1.2.4",
    "@types/classnames": "^2.2.7",
    "@types/express": "^4.16.0",
    "@types/isomorphic-fetch": "^0.0.35",
    "@types/next": "^8.0.3",
    "@types/node": "^11.13.5",
    "@types/react": "^16.8.14",
    "@types/react-dom": "^16.0.11",
    "@types/storybook__addon-actions": "^3.4.2",
    "@types/storybook__react": "^4.0.1",
    "@types/styled-jsx": "^2.2.8",
    "@zeit/next-typescript": "^1.1.1",
    "babel-loader": "^8.0.5",
    "babel-preset-react-app": "^7.0.2",
    "classnames": "^2.2.6",
    "express": "^4.16.4",
    "express-basic-auth": "^1.1.6",
    "fork-ts-checker-webpack-plugin": "^1.0.4",
    "glamor": "^2.20.40",
    "image-trace-loader": "^0.1.0",
    "imagemin-gifsicle": "^6.0.1",
    "imagemin-mozjpeg": "^8.0.0",
    "imagemin-optipng": "^7.0.0",
    "imagemin-svgo": "^7.0.0",
    "isomorphic-fetch": "^2.2.1",
    "jimp": "^0.6.4",
    "lqip-loader": "^2.2.0",
    "moment": "^2.24.0",
    "next": "8.1.0",
    "next-compose-plugins": "^2.1.1",
    "next-optimized-images": "^2.3.3",
    "prop-types": "^15.7.2",
    "react": "^16.7.0",
    "react-docgen-typescript": "^1.12.4",
    "react-dom": "^16.7.0",
    "react-icons": "^3.6.1",
    "react-infinite-scroller": "^1.2.4",
    "react-moment": "^0.9.2",
    "responsive-loader": "^1.2.0",
    "sharp": "^0.22.0",
    "storybook-readme": "^5.0.2",
    "styled-components": "^4.2.0",
    "styled-jsx": "3.2.1",
    "svg-sprite-loader": "^4.1.6",
    "ts-node": "^8.1.0",
    "typescript": "^3.4.4",
    "webp-loader": "^0.5.0",
    "webpack": "^4.34.0"
  },
  "peerDependencies": {
    "file-loader": "^4.0.0"
  }
}

Yarn: 1.17.0 Node: v12.4.0 MacOS: 10.14.5 (18F132)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cyrilwannercommented, Jun 23, 2019

Hi @AndrewRademacher, thank you for the bug report! I just pushed a patch to npm which should fix this problem. Can you install v2.5.2 and confirm that this resolved this issue? Thanks!

0reactions
AndrewRademachercommented, Jun 24, 2019

That did the trick! Optimized images now works as expected in all of my environments. Thank you again for the extremely rapid responses.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Image Optimization using Next.js default loader is not ...
js' default loader is not compatible with next export . Possible solutions: Use next start to run a server, which includes the Image ......
Read more >
Optimization - webpack
Tells webpack to find segments of the module graph which can be safely concatenated into a single module. Depends on optimization.
Read more >
Autoloader optimization - Composer
For this reason, Composer offers a few strategies to optimize the autoloader. Note: You should not enable any of these optimizations in development...
Read more >
Framer Learn: How to debug a publish or optimization warning
Framer sites are built in React, which means that without optimization, the visitor would see a blank page until React loads and renders...
Read more >
Error Codes for Failed Optimization Attempts - NitroPack
In this article, you can find details about the error codes for failed ... NitroPack does not optimize the page type by default...
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