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

Getting Started: FAQ

Maoz Dror edited this page Dec 13, 2021 · 4 revisions

I'm encountering [some random error]!

Make sure that the version of NodeJS being used for your project is Node v16 or greater. @synapsecns/sdk is only tested on Node v16 and later versions, and earlier versions are not supported.

One easy way to use per-project Node versions is to install and use nvm. nvm makes this process very simple.

My project won't compile with tsc when @synapseprotocol/sdk is installed

In addition to checking your NodeJS version, ensure that the tsc binary being used by your build process is the one found in your project's node_modules folder, and that your Typescript version is >= 4.4.4, which is as easy as npm i --save-dev typescript@4.4.4 or yarn add --dev typescript@4.4.4.

If you aren't already using package.json scripts for your tsc runs, simply add the following entry into the scripts object in your package.json:

"scripts": {
  "build": "tsc",
  // [the rest of your scripts]
}

Now, you can run npm run build or yarn run build and the project-local version of Typescript and tsc will be used for builds.

Additionally, @synapseprotocol/sdk targets es2016 or later. This means that you'll have to use some sort of transpiler like Babel if you aren't already.