Giter Site home page Giter Site logo

TypeError: withImageLoader is not a function (warning [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. about next-cms-ghost HOT 6 CLOSED

hoangddt avatar hoangddt commented on June 14, 2024
TypeError: withImageLoader is not a function (warning [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

from next-cms-ghost.

Comments (6)

hoangddt avatar hoangddt commented on June 14, 2024 1

Actually, I was using yarn 3.5 in my local, and it modifys the lock file, make it can not build in vercel. Leave yarn.lock untouch and it work fine

from next-cms-ghost.

hoangddt avatar hoangddt commented on June 14, 2024

I realize on my machine, next-image-loader was on version 2.0.6, so I update package.json and set it from "next-image-loader": "^2.0.6" to "next-image-loader": "2.0.6".
Run deploy again, the vercel log now be:

Skipping build cache, deployment was triggered without cache.
--
00:22:01.286 | Cloning completed: 981.477ms
00:22:01.416 | Running "vercel build"
00:22:01.870 | Vercel CLI 29.1.1
00:22:02.122 | Installing dependencies...
00:22:02.420 | yarn install v1.22.17
00:22:02.483 | [1/4] Resolving packages...
00:22:13.200 | warning @types/[email protected]: This is a stub types definition. testing-library__react provides its own type definitions, so you do not need this installed.
00:22:16.228 | warning [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
00:22:17.188 | warning postcss-color-mod-function > postcss-values-parser > [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
00:22:18.660 | [2/4] Fetching packages...
00:22:30.076 | [3/4] Linking dependencies...
00:22:30.079 | warning "@types/testing-library__react > @testing-library/[email protected]" has incorrect peer dependency "react@^18.0.0".
00:22:30.079 | warning "@types/testing-library__react > @testing-library/[email protected]" has incorrect peer dependency "react-dom@^18.0.0".
00:22:36.684 | [4/4] Building fresh packages...
00:22:37.792 | success Saved lockfile.
00:22:37.798 | Done in 35.38s.
00:22:37.842 | Detected Next.js version: 12.0.9
00:22:37.844 | Running "yarn run build"
00:22:38.048 | yarn run v1.22.17
00:22:38.076 | $ next build
00:22:38.539 | info  - Loaded env from /vercel/path0/.env.production
00:22:38.695 | Attention: Next.js now collects completely anonymous telemetry regarding usage.
00:22:38.695 | This information is used to shape Next.js' roadmap and prioritize features.
00:22:38.696 | You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
00:22:38.696 | https://nextjs.org/telemetry
00:22:38.696 |  
00:22:38.759 | info  - Checking validity of types...
00:22:38.768 | It looks like you're trying to use TypeScript but do not have the required package(s) installed.
00:22:38.768 |  
00:22:38.768 | Please install @types/react by running:
00:22:38.769 |  
00:22:38.769 | yarn add --dev @types/react
00:22:38.769 |  
00:22:38.769 | If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).
00:22:38.769 |  
00:22:38.786 | error Command failed with exit code 1.
00:22:38.787 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
00:22:38.810 | Error: Command "yarn run build" exited with 1
00:22:39.503 | Deployment completed
00:22:39.125 | BUILD_UTILS_SPAWN_1: Command "yarn run build" exited with 1


from next-cms-ghost.

hoangddt avatar hoangddt commented on June 14, 2024

Follow the log file above, I ran yarn add --dev @types/react, it bump @types/react from ^17.0.39 to ^18.2.6. I push again and still got error as above

from next-cms-ghost.

EmranEmon47 avatar EmranEmon47 commented on June 14, 2024

as your error >> 00:10:09.303 | TypeError: withImageLoader is not a function
put your {withImageLoader} into the 2nd bracket {} . that is in your next.config.js file

it will be like this>> const {withImageLoader} = require('next-image-loader')

from next-cms-ghost.

hoangddt avatar hoangddt commented on June 14, 2024

@EmranEmon47 I did that and encoutered this log:

Skipping build cache, deployment was triggered without cache.
--
00:22:01.286 | Cloning completed: 981.477ms
00:22:01.416 | Running "vercel build"
00:22:01.870 | Vercel CLI 29.1.1
00:22:02.122 | Installing dependencies...
00:22:02.420 | yarn install v1.22.17
00:22:02.483 | [1/4] Resolving packages...
00:22:13.200 | warning @types/[email protected]: This is a stub types definition. testing-library__react provides its own type definitions, so you do not need this installed.
00:22:16.228 | warning [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
00:22:17.188 | warning postcss-color-mod-function > postcss-values-parser > [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
00:22:18.660 | [2/4] Fetching packages...
00:22:30.076 | [3/4] Linking dependencies...
00:22:30.079 | warning "@types/testing-library__react > @testing-library/[email protected]" has incorrect peer dependency "react@^18.0.0".
00:22:30.079 | warning "@types/testing-library__react > @testing-library/[email protected]" has incorrect peer dependency "react-dom@^18.0.0".
00:22:36.684 | [4/4] Building fresh packages...
00:22:37.792 | success Saved lockfile.
00:22:37.798 | Done in 35.38s.
00:22:37.842 | Detected Next.js version: 12.0.9
00:22:37.844 | Running "yarn run build"
00:22:38.048 | yarn run v1.22.17
00:22:38.076 | $ next build
00:22:38.539 | info  - Loaded env from /vercel/path0/.env.production
00:22:38.695 | Attention: Next.js now collects completely anonymous telemetry regarding usage.
00:22:38.695 | This information is used to shape Next.js' roadmap and prioritize features.
00:22:38.696 | You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
00:22:38.696 | https://nextjs.org/telemetry
00:22:38.696 |  
00:22:38.759 | info  - Checking validity of types...
00:22:38.768 | It looks like you're trying to use TypeScript but do not have the required package(s) installed.
00:22:38.768 |  
00:22:38.768 | Please install @types/react by running:
00:22:38.769 |  
00:22:38.769 | yarn add --dev @types/react
00:22:38.769 |  
00:22:38.769 | If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).
00:22:38.769 |  
00:22:38.786 | error Command failed with exit code 1.
00:22:38.787 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
00:22:38.810 | Error: Command "yarn run build" exited with 1
00:22:39.503 | Deployment completed
00:22:39.125 | BUILD_UTILS_SPAWN_1: Command "yarn run build" exited with 1

Also run yarn add --dev @types/react build still have the same error

from next-cms-ghost.

hoangddt avatar hoangddt commented on June 14, 2024

I switch back to a version of this repo in the last year and it can be built and deployed.

from next-cms-ghost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.