0

I followed the steps provided in the Grafana official docs: text

But facing below mentioned issue:

C:\Users\mydir\my-plugin>yarn create @grafana/plugin migrate
yarn create v1.22.19
warning ..\..\..\..\..\..\..\package.json: No license field
[1/4] Resolving packages...
warning @grafana/create-plugin > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning @grafana/create-plugin > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @grafana/create-plugin > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
warning @grafana/create-plugin > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error C:\Users\AGaur\AppData\Local\Yarn\Data\global\node_modules\core-js-pure: Couldn't find the binary node -e "try{require('./postinstall')}catch(e){}"
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

I tried searching around for the mentioned error but got no success. Can anyone help me around this?

1 Answers1

0

How I resolved it: After scratching my head for a while and trying various other commands, I understood that the problem was with the ComSpec environment variable. Though it was showing like this in the view mode: Environment Variable list

But in edit mode the value was actually: %SystemRoot%\System32\cmd.exe When I checked for the actual values of %SystemRoot% it came to C:\windows If you'll notice it precisely the w in windows is in small letters in the latter part. This was not being resolved with yarn and hence the error.

Solution: I hard coded the value for the ComSpec variable to C:\Windows\System32\cmd.exe