Help required with clarity sdk quickstart

Hi all,

I am trying to get familiarised with clarity sdk by trying out the sample hello world program. I followed the steps from the link below .

[https://docs.blockstack.org/core/smart/sdk-quickstart.html]

While executing the command ``` npm init yo clarity-dev - got the below error C:\Users\xxx\slamtrade\workspace\hello-clarity-sdk>npm init yo clarity-dev
npx: installed 15 in 5.653s
Command failed: C:“Program Files”\nodejs\node.exe “C:\Users\xxx\AppData\Roaming\npm\npm” config get cache --parseableC:\Users\xxx\AppData\Roaming\npm\npm:2
basedir=$(dirname “$(echo “$0” | sed -e ‘s,\,/,g’)”)
^^^^^^^

SyntaxError: missing ) after argument list
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)

Then I tried the command npm install -g yo generator-clarity-dev to install the clarity-dev generator by following the steps in https://github.com/blockstack/clarity-js-sdk/blob/master/packages/generator-clarity-dev/README.md and now I am getting an error related to clarity-native-bin dependency . error is listed below ,

{ Error: ENOENT: no such file or directory, mkdir ‘C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-clarity-dev\node_modules@blockstack\clarity-native-bin.native-bin\clarity-sdk-v0.0.5’
at Object.mkdirSync (fs.js:738:3)
at Object.verifyOutputFile (C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-clarity-dev\node_modules@blockstack\clarity-native-bin\lib\fsUtil.js:58:16)
at Object.installDefaultPath (C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-clarity-dev\node_modules@blockstack\clarity-native-bin\lib\index.js:96:36)
at exports.default (C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-clarity-dev\node_modules@blockstack\clarity-native-bin\lib\directInstall.js:9:44)
at Object. (C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-clarity-dev\node_modules@blockstack\clarity-native-bin\lib\directInstall.js:21:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
errno: -4058,
syscall: ‘mkdir’,
code: ‘ENOENT’,
path:
‘C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-clarity-dev\node_modules\@blockstack\clarity-native-bin\.native-bin\clarity-sdk-v0.0.5’ }
Error writing to C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-clarity-dev\node_modules@blockstack\clarity-native-bin.native-bin\clarity-sdk-v0.0.5\clarity-cli.exe
npm WARN @blockstack/[email protected] requires a peer of @blockstack/clarity-native-bin@^0.1.4-alpha.0 but none is installed. You must install peer dependencies yourself.

Can someone please help me out how to proceed further ?

Note:- My npm version - 6.8
system config- windows 10
I ran npx yo doctor and all the sanity checks passed .

Hi @HariniRajan I created an issue for this in the Clarity SDK repo here: https://github.com/blockstack/clarity-js-sdk/issues/44

I was able to reproduce a similar issue, pushed a fix to npm, and it works as expected on Windows for me. You can see more details in the linked github issue.

1 Like

Thank you . The issue is resolved now .I am able to get started with clarity sdk .