Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Error: Fetch error: 404 Not Found Instantiating #8

Open
HernanMora opened this issue Jan 16, 2020 · 10 comments · May be fixed by #7
Open

Error: Fetch error: 404 Not Found Instantiating #8

HernanMora opened this issue Jan 16, 2020 · 10 comments · May be fixed by #7

Comments

@HernanMora
Copy link

Hi!
After all steps for building I get the following error:

Error: Fetch error: 404 Not Found Instantiating http://localhost:3000/public/plugins/grafana-simple-json-backend-datasource/module.js Loading plugins/grafana-simple-json-backend-datasource/module

There is no module.js file, only .ts files in the dist folder. How can it be solved?

@HadesArchitect
Copy link

Hi @HernanMora,

  1. How exactly did you build the project?
  2. Could you try to build the project using steps from https://github.com/HadesArchitect/simple-json-backend-datasource/blob/build-docs/README.md?

Answering your question, it looks like the typescipt files were not transpiled to javascript leading to the issue. The build process was incorrect.

@HernanMora
Copy link
Author

Hi @HadesArchitect

I used the Local Way and the Makefile but now I'm going to try the Docker way

@HadesArchitect
Copy link

Oh cool. I tested only docker way because I don't have all the deps installed locally. Thank you for the bug report, I will take a look.

@HadesArchitect
Copy link

@HernanMora Ok I see what's the problem. There is a missing step in build process, webpack is needed to compile typescript files, I haven't included it.

@HadesArchitect
Copy link

Meanwhile you may take a look at https://github.com/HadesArchitect/grafana-cassandra-source as an example, branch backend is the most up to date. Works well with typescript.

@HadesArchitect
Copy link

HadesArchitect commented Jan 16, 2020

Yep, fixed it, works correctly now. I'll push an update soon.

image

@HernanMora
Copy link
Author

Thank you! I will be taking a look

@HadesArchitect
Copy link

Fixed and updated, please try to follow the new instructions.

https://github.com/HadesArchitect/simple-json-backend-datasource/tree/build-docs

@HernanMora
Copy link
Author

Docker way works correctly, I will use this method.
Thank you for the speed in solving my problem, you do an excellent job!

@HadesArchitect HadesArchitect linked a pull request Jan 16, 2020 that will close this issue
@l3pond
Copy link

l3pond commented Oct 14, 2020

Hello there! I'm really new in this area, and I'm having trouble building this project.

Unfortunately, I didn't manage to build the project on Windows 10. Docker didn't seem to work at all for me. Through the Local Way, I managed to do step 1 and 2 (yarn install and webpack). However, I just can't make the dep ensure step to work. I get the following error:

C:\PROGRA~1\GrafanaLabs\grafana\data\plugins\simple-json-backend-datasource-master>dep ensure
root project import: C:\PROGRA~1\GrafanaLabs\grafana\data\plugins\simple-json-backend-datasource-master is not within any GOPATH/src

My go env directories are:

set GO111MODULE=
set GOARCH=amd64
set GOBIN=C:\Progra~1\GrafanaLabs\grafana\data\plugins\simple-json-backend-datasource-master\bin
set GOCACHE=C:\Users\ENGENHARIA-03\AppData\Local\go-build
set GOENV=C:\Users\ENGENHARIA-03\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Progra~1\GrafanaLabs\grafana\data\plugins\simple-json-backend-datasource-master\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Progra~1\GrafanaLabs\grafana\data\plugins\simple-json-backend-datasource-master
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ENGENHARIA-03\AppData\Local\Temp\go-build240940786=/tmp/go-build -gno-record-gcc-switches

Any ideas of what might be happening?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants