Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package generator issues on Windows #44

Closed
zone117x opened this issue Sep 5, 2019 · 2 comments

Comments

@zone117x
Copy link
Member

commented Sep 5, 2019

From HariniRajan -- https://forum.blockstack.org/t/help-required-with-clarity-sdk-quickstart/8934


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/clarity@0.1.10-alpha.0 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 .

@zone117x

This comment has been minimized.

Copy link
Member Author

commented Sep 5, 2019

I was able to reproduce a similar issue when running npm install -g yo generator-clarity-dev.
Pushed a fixed and it is working on Windows for me now.

Note: running npm init yo clarity-dev will not work on some Windows installations due to a bug in the create-yo dependency.

@zone117x

This comment has been minimized.

Copy link
Member Author

commented Sep 6, 2019

The npm initializer package is finished and the command npm init clarity-dev can be ran. Fixes issues with global package installation, bugs with create-yo, and outdated app generator installations.

@zone117x zone117x closed this Sep 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.