Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed while running npm run build on blues stack #229

Open
crazydreamproject opened this issue Jan 19, 2024 · 2 comments
Open

Build failed while running npm run build on blues stack #229

crazydreamproject opened this issue Jan 19, 2024 · 2 comments

Comments

@crazydreamproject
Copy link

crazydreamproject commented Jan 19, 2024

Reproduction

Do following commands (on Node.js command prompt)

$ npx create-remix@latest --template remix-run/blues-stack
$ npm run docker
(wait a while until you see LOG: database system is ready to accept connections in docker logs)
$ npm run setup
$ npm run build

System Info

On Windows10, with docker desktop 4.25.1, node v20.11.0, npm 10.3.0

Used Package Manager

npm

Expected Behavior

$ npm run build to complete successfully

Actual Behavior

npm run build

build
run-s build:*

build:remix
remix build

info building... (NODE_ENV=production)
The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new
The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new
X [ERROR] Build failed with 1 error:
node_modules/@remix-run/dev/dist/compiler/plugins/cssImports.js:174:30: ERROR: [plugin: css-file] entry file not found [plugin css-bundle-plugin]

app/root.tsx:1:30:
  1 │ import { cssBundleHref } from "@remix-run/css-bundle";
    ╵                               ~~~~~~~~~~~~~~~~~~~~~~~

This error came from the "onLoad" callback registered here:

node_modules/@remix-run/dev/dist/compiler/plugins/cssBundlePlugin.js:35:12:
  35 │       build.onLoad({
     ╵             ~~~~~~

at setup (C:\Users\CDP\GitHub\remix-blues-test\node_modules\@remix-run\dev\dist\compiler\plugins\cssBundlePlugin.js:35:13)
at handlePlugins (C:\Users\CDP\GitHub\remix-blues-test\node_modules\@remix-run\dev\node_modules\esbuild\lib\main.js:1279:21)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

X [ERROR] entry file not found [plugin css-file]

node_modules/@remix-run/dev/dist/compiler/plugins/cssImports.js:174:30:
  174 │           invariant["default"](entryFile, "entry file not found");
      ╵                               ^

at Object.invariant [as default] (C:\Users\CDP\GitHub\remix-blues-test\node_modules\@remix-run\dev\dist\invariant.js:18:11)
at C:\Users\CDP\GitHub\remix-blues-test\node_modules\@remix-run\dev\dist\compiler\plugins\cssImports.js:174:31
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

This error came from the "onLoad" callback registered here:

node_modules/@remix-run/dev/dist/compiler/plugins/cssImports.js:77:12:
  77 │       build.onLoad({
     ╵             ~~~~~~

at setup (C:\Users\CDP\GitHub\remix-blues-test\node_modules\@remix-run\dev\dist\compiler\plugins\cssImports.js:77:13)
at handlePlugins (C:\Users\CDP\GitHub\remix-blues-test\node_modules\@remix-run\dev\node_modules\esbuild\lib\main.js:1279:21)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

The plugin "css-file" was triggered by this import

app/root.tsx:14:23:
  14 │ import stylesheet from "~/tailwind.css";
     ╵                        ~~~~~~~~~~~~~~~~

ERROR: "build:remix" exited with 1.

@crazydreamproject
Copy link
Author

Some more info:
I'm using remix v2.5.0, changing to 2.5.1 has same issue.
CUI I'm using is Nodejs command prompt (installed by node.js installer)
When I change CUI to gitbash, npm run build exited successfully.

Hope this helps,

@brophdawg11
Copy link
Contributor

This must have something to do with the node command prompt you're using since it works in gitbash (and I also confirmed it all runs fine on my OSX machine). I'm going to transfer this to the blues-stack repo as an issue specific to that setup when using the node command prompt.

@brophdawg11 brophdawg11 transferred this issue from remix-run/remix Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants