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

make build fails #24

Open
gedw99 opened this issue Jul 1, 2024 · 3 comments
Open

make build fails #24

gedw99 opened this issue Jul 1, 2024 · 3 comments

Comments

@gedw99
Copy link

gedw99 commented Jul 1, 2024

on Mac..

  1. bootstrap to "gedw99" and cd into it.

  2. make dev, works fine : http://localhost:7331

  3. make build, failed with:

make build
make[1]: Entering directory '/Users/apple/workspace/go/src/github.com/superkit/gedw99'

Rebuilding...
(node:79932) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
Error: Cannot find module 'tailwindcss/defaultTheme'
Require stack:
- /Users/apple/workspace/go/src/github.com/superkit/gedw99/tailwind.config.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15)
    at Function.resolve (node:internal/modules/helpers:133:19)
    at _resolve (/Users/apple/.npm/_npx/bc7494899bbce1ca/node_modules/jiti/dist/jiti.js:1:251148)
    at jiti (/Users/apple/.npm/_npx/bc7494899bbce1ca/node_modules/jiti/dist/jiti.js:1:253746)
    at /Users/apple/workspace/go/src/github.com/superkit/gedw99/tailwind.config.js:1:96
    at evalModule (/Users/apple/.npm/_npx/bc7494899bbce1ca/node_modules/jiti/dist/jiti.js:1:256443)
    at jiti (/Users/apple/.npm/_npx/bc7494899bbce1ca/node_modules/jiti/dist/jiti.js:1:254371)
    at /Users/apple/.npm/_npx/bc7494899bbce1ca/node_modules/tailwindcss/lib/lib/load-config.js:52:30
    at loadConfig (/Users/apple/.npm/_npx/bc7494899bbce1ca/node_modules/tailwindcss/lib/lib/load-config.js:54:6)
    at Object.loadConfig (/Users/apple/.npm/_npx/bc7494899bbce1ca/node_modules/tailwindcss/lib/cli/build/plugin.js:135:49) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/apple/workspace/go/src/github.com/superkit/gedw99/tailwind.config.js'
  ]
}
make[1]: *** [Makefile:64: build] Error 1

The fix for me was to add an "@npm install" and so its becomes:

build:
	@npm install
	@npx tailwindcss -i app/assets/app.css -o ./public/assets/styles.css
	@npx esbuild app/assets/index.js --bundle --outdir=public/assets
	@go build -o bin/app_prod cmd/app/main.go
	@echo "compiled you application with all its assets to a single binary => bin/app_prod"
@gedw99 gedw99 changed the title build fails make build fails Jul 1, 2024
@anthdm
Copy link
Owner

anthdm commented Jul 1, 2024

Aha thanks for pointing out!

@damione1
Copy link

damione1 commented Jul 1, 2024

I'm almost to the end of a project using Superkit, and I'm wondering: What is your habitual strategy/ go-to way for deploying single binary Golang projects?

Did you embed them in a docker and mount a folder for the DB? Or in a Kubernetes ? Have you tried KO?

@gedw99
Copy link
Author

gedw99 commented Jul 1, 2024

I use fly.io these days.

you embed in a docker and fly runs the docker.

I used to use KO and google cloud.

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

3 participants