Recently, there is a new Deno project initiated by Ry, the original author of Node, which is instantly popular and the number of star flies. However, there are still some small problems in the process of setting up the environment, but they have been solved under the friendly issue! Then summarize and give a thumbs up to those who contribute their own solutions to the issue selflessly! Harmony in the open source community requires everyone to work together.

GitHub – RY/denO: A Secure TypeScript Runtime on V8

Step1

Please prepare VPN * before you start. You need to install the Go environment. And export the environment variables related to Go.

The following is the founder leaders to provide me with solutions, thank you very much. https://github.com/ry/deno/issues/92 Mac OS can refer to the following:

export GOROOT=/usr/local/go # where your `go` sitting, usually here ( Mac )
export GOPATH=$HOME/go # means `~/go` 
export PATH=$PATH:$HOME/go/bin:$GOPATH/bin
Copy the code

If the Mac is, we need to install xcode – select http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/

We also need to install Protobuf. Ubuntu below:

CD ~ wget unzip at https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip Protoc - 3.1.0 - Linux - x86_64.zip export PATH = $HOME/bin: $PATHCopy the code

Brew install protobuf install pkg-config for Mac, not mentioned in README

Step2

Ok, everything above is normal, nothing wrong. Moving on, we now need protoc-gen-go and Go-bindata:

go get -u github.com/golang/protobuf/protoc-gen-go
go get -u github.com/jteeuwen/go-bindata/...
Copy the code

This step needs to wait for a guy, remember must VPN ah!

Step3

Now it’s time for the troubled V8Worker2. We need to get and build it. It will take about 30 minutes

go get -u github.com/ry/v8worker2
cd $GOPATH/src/github.com/ry/v8worker2
./build.py --use_ccache
Copy the code

Here’s what you might see:

clone

cd $GOPATH/src/github.com/ry/v8worker2
rm -rf v8
git clone https://github.com/v8/v8.git
cd v8
git checkout fe12316ec4b4a101923e395791ca55442e62f4cc
Copy the code

Or 2.

export PATH=$PATH:$GOPATH/src/github.com/ry/v8worker2/depot_tools cd $GOPATH/src/github.com/ry/v8worker2 rm -rf v8 fetch  v8 cd v8 git checkout fe12316Copy the code

I tried the second method because I found my VPN didn’t download quickly using the first method. If you type fetch, the command line appears command not found: fetch. You can try

cd $GOPATH/src/github.com/ry/v8worker2
depot_tools/./fetch v8
Copy the code

Thank you for getting V8worker2 Direct fetching of that commit failed? @wBGBg, @qti3e, @ztplz

If you find yourself with nothing in the depot_tools folder. You need to execute the following command

cd $GOPATH/src/github.com/ry/v8worker2
git submodule update --init
Copy the code

After going back

cd $GOPATH/src/github.com/ry/v8worker2
./build.py
Copy the code

You see the following, then congratulations! He’s compiling

Step4

The last step

go get -u github.com/ry/deno/... CD $GOPATH/src/github.com/ry/deno make #. Wait a moment/deno testdata / 001 _hello. Js # Output: Hello WorldCopy the code

Hello World again! At Go get-u github.com/ry/deno/… Don’t worry if you encounter the following problems, just make deno go! Deno /dispatch.go:10:26: undefined: BaseMsg · Issue #71 · ry/deno · GitHub

$go get -u github.com/ry/deno/...
# github.com/ry/deno. /deno/dispatch.go:10:26: undefined: BaseMsg .. /deno/dispatch.go:30:10: undefined: BaseMsg .. /deno/dispatch.go:62:14: undefined: BaseMsg .. /deno/dispatch.go:68:34: undefined: Msg .. /deno/dispatch.go:119:13: select case must be receive, send or assign recv .. /deno/fetch.go:13:11: undefined: Msg .. /deno/fetch.go:16:8: undefined: Msg_FETCH_REQ .. /deno/fetch.go:29:14: undefined: Msg .. /deno/main.go:38:15: undefined: Asset .. /deno/main.go:110:19: undefined: Msg .. /deno/main.go:110:19: too many errorsCopy the code

If you have any of the following problems with make Deno, you haven’t done the solution given by founder in step 1. Go back and configure!

Done!

When I run./build.py — use_ccache,there was a mistake · issue #60 · ry/deno · GitHub

  • Mygithub
  • Myblog