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.

build error in production

See original GitHub issue

Describe the bug

when i excute npm run build

image

because i add a plugin to css-module my css/scss file, but in development environment, the project can run ~ . Now i want to know the difference between development environment and production environment I need to change(plugin)

Reproduction

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

System:
    OS: macOS Mojave 10.14.3
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 1.25 GB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.14.12 - ~/.nvm/versions/node/v14.16.1/bin/npm
  Browsers:
    Chrome: 90.0.4430.85
    Firefox: 88.0
    Safari: 12.0.3
  npmPackages:
    vite: ^2.1.5 => 2.2.1

Used package manager:

yarn

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
underfincommented, May 12, 2021

The ?.module.styl is added by vite-plugin-transform-css-modules plugin, but it not resolve it at build, you should report to it. The vite dev server should also report this error, i open a pr for make consistence for vite dev and build.

0reactions
bluwycommented, Mar 7, 2022

Closing as it’s an issue with the vite-plugin-transform-css-modules plugin. I can’t reproduce the error in https://github.com/Summer-andy/vite-react-template too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nextjs project is showing build error only on production build.
Hello,. our team is currently having some build issues with Vercel, the situation being the whole project builds just fine on preview ...
Read more >
Next.js project error in production build - Stack Overflow
To fix this error, identify the source of the erroneous NODE_ENV value and get rid of it: Next.js automatically sets the correct value...
Read more >
Error in nextjs production build (Just in production)
Hi! We are running our app with builder within a vercel deployment, directly forking nextjs-builder-io-landing-page builderio github ...
Read more >
Read your production Angular Errors like a pro - Medium
We all want to build bug-free applications. ... Read your production Angular Errors like a pro ... Reading production error stack trace.
Read more >
Ignoring TypeScript Errors - next.config.js
Next.js fails your production build ( next build ) when TypeScript errors are present in your project. If you'd like Next.js to dangerously...
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