Coder Social home page Coder Social logo

PostCSS issues and Next.js about postcss HOT 6 CLOSED

MrOxMasTer avatar MrOxMasTer commented on September 25, 2024
PostCSS issues and Next.js

from postcss.

Comments (6)

MrOxMasTer avatar MrOxMasTer commented on September 25, 2024

Another bonus with "type": "module" I can't build a project. Even on version 14.1.2-canary.3.

src\app\layout.tsx
An error occurred in next/font.

Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\Алексей\OneDrive\Рабочий стол\PetProjects\shopco\postcss.config.js from C:\Users\Алексей\OneDrive\Рабочий стол\PetProjects\shopco\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\lib\find-config.js not supported.
Instead change the require of postcss.config.js in C:\Users\Алексей\OneDrive\Рабочий стол\PetProjects\shopco\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\lib\find-config.js to a dynamic import() which is available in all CommonJS modules.
at mod.require (C:\Users\Алексей\OneDrive\Рабочий стол\PetProjects\shopco\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\server\require-hook.js:65:28)
at findConfig (C:\Users\Алексей\OneDrive\Рабочий стол\PetProjects\shopco\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\lib\find-config.js:58:20)
at async getPostCssPlugins (C:\Users\Алексей\OneDrive\Рабочий стол\PetProjects\shopco\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\webpack\config\blocks\css\plugins.js:89:18)
at async C:\Users\Алексей\OneDrive\Рабочий стол\PetProjects\shopco\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\webpack\config\blocks\css\index.js:124:36

image

from postcss.

ai avatar ai commented on September 25, 2024

Show your PostCSS config

from postcss.

MrOxMasTer avatar MrOxMasTer commented on September 25, 2024

ts config
imagets config.

postCSS config
image

from postcss.

MrOxMasTer avatar MrOxMasTer commented on September 25, 2024

I also can't switch the post CSS config to the ts version. The project just stops seeing it, even though I explicitly specify the file in input ts.config, but I did something wrong here or did not understand
image

from postcss.

ai avatar ai commented on September 25, 2024

Sorry, everything looks OK from PostCSS side and the error shows that it is an environment issue rather than PostCSS.

Ask in Next.js community.

from postcss.

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.