Skip to content

Instantly share code, notes, and snippets.

View patientplatypus's full-sized avatar

patientplatypus patientplatypus

View GitHub Profile
./src/components/pages/Edit/engine/engine/engine.gc.wasm
Module parse failed: magic header not detected
File was processed with these loaders:
* ./node_modules/file-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
Error: magic header not detected
./src/components/pages/Edit/engine/engine/engine.gc.wasm
Module parse failed: magic header not detected
File was processed with these loaders:
* ./node_modules/file-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
Error: magic header not detected
Here is my nginx file -
I can get to the frontend at thedailyblech.com/,
but I can't get to the backend at thedailyblech.com/back/foo. Why?
server {
listen 80;
listen [::]:80;
(ns clojure-play.core
(:use org.httpkit.server
[compojure.core :refer :all]
[compojure.route :as route]
[clojure.data.json :as json]
[clojure.tools.logging :only [info]]
[clojure-play.routes :as routes]
[ring.middleware.json :only [wrap-json-body]]
[ring.middleware.cors :refer [wrap-cors]])
(:require [monger.core :as mg]
(defn wrap-preflight [handler]
(fn [request]
(do
(println "inside wrap-preflight")
(println "value of request")
(println request)
(println "value of handler")
(println handler)
(if (preflight? request)
{:status 200
(defn wrap-preflight [handler]
(fn [request]
(do
(println "inside wrap-preflight")
(println "value of request")
(println request)
(println "value of handler")
(println handler)
(if (preflight? request)
{:status 200
backend | inside wrap-preflight
backend | value of request
backend | {:remote-addr 69.115.133.234, :headers {origin http://thedailyblech.com, host thedailyblech.com:4000, user-agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0, referer http://thedailyblech.com/, connection keep-alive, accept application/json, text/plain, */*, accept-language en-US,en;q=0.5, accept-encoding gzip, deflate, dnt 1, cache-control max-age=0}, :async-channel #object[org.httpkit.server.AsyncChannel 0x44e4adee /172.18.0.2:4000<->/69.115.133.234:59127], :server-port 4000, :content-length 0, :websocket? false, :content-type nil, :character-encoding utf8, :uri /read_comments/home, :server-name thedailyblech.com, :query-string nil, :body nil, :scheme :http, :request-method :get}
backend | value of handler
backend | #object[ring.middleware.cors$wrap_cors$fn__4017 0x29663582 ring.middleware.cors$wrap_cors$fn__4017@29663582]
backend | Fri Sep 20 14:00:52 GMT 2019 [worker-1]
(ns clojure-play.core
(:use org.httpkit.server
[compojure.core :refer :all]
[compojure.route :as route]
[clojure.data.json :as json]
[clojure.tools.logging :only [info]]
[clojure-play.routes :as routes]
[ring.middleware.json :only [wrap-json-body]]
[ring.middleware.cors :refer [wrap-cors]])
(:require [monger.core :as mg]
(ns clojure-play.core
(:use org.httpkit.server
[compojure.core :refer :all]
[compojure.route :as route]
[clojure.data.json :as json]
[clojure.tools.logging :only [info]]
[clojure-play.routes :as routes]
[ring.middleware.json :only [wrap-json-body]]
[ring.middleware.cors :refer [wrap-cors]])
(:require [monger.core :as mg]
When I try and run yarn build I run into the following error -
Peters-MBP:daily_blech patientplatypus$ yarn build
yarn run v1.17.0
$ react-scripts build
Creating an optimized production build...
Failed to compile.