I have tried to install bit environment in my PC with below command
yarn global add bit-bin
After running this command I can see some errors running in the prompt.
yarn global v1.7.0
[1/4] Resolving packages...
warning bit-bin > jfs > [email protected]: Use uuid module instead
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[-/3] â ˆ waiting...
[2/3] â ˆ posix
warning Error running install script for optional dependency: "C:\Users\VladFive\AppData\Local\Yarn\Data\global\node_modules\posix: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\Users\VladFive\AppData\Local\Yarn\Data\global\node_modules\posix
Output:
C:\Users\VladFive\AppData\Local\Yarn\Data\global\node_modules\posix>if not defined npm_config_node_gyp (node \"C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js\" rebuild ) else (node \"\" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable \"C:\Users\VladFive\AppData\Local\Programs\Python\Python37-32\python.EXE\", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\VladFive\AppData\Roaming\nvm\v10.4.1\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)gyp ERR! stack at PythonFinder.
gyp ERR! stack at C:\Users\VladFive\AppData\Roaming\nvm\v10.4.1\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:184:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command \"C:\\Program Files\\nodejs\\node.exe\" \"C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js\"
\"rebuild\"
gyp ERR! cwd C:\Users\VladFive\AppData\Local\Yarn\Data\global\node_modules\posix
gyp ERR! node -v v10.4.1
gyp ERR! node-gyp -v v3.6.2
success Installed "[email protected]" with binaries:
- bit
Done in 238.19s.
It seems it has done, but when I type bit init command, it doesn't work.
>
'bit' is not recognized as an internal or external command,
operable program or batch file.
After several trying above process, bit command was enabled
But when I tried bit init again, I saw vue version mismatch error
Failed loading the driver for javascript. Got an error from the driver: Error:
Vue packages version mismatch:
This may cause things to work incorrectly. Make sure to use the same version for both.
>
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
I can 't solve this problem
I'm getting the version mismatch error too. Tried current project and brand new project created by Vue CLI 3 with same results. Using Windows 10.
Hi, @NickyWisenov @Taramouse ,
Is there a chance you have installed Bit as a local dependency to the project and not a global dependency?
We encountered a few users who got those errors while installing Bit locally.
The reason for this issue is that Bit uses some of Vue's core libs to resolve *.vue files. So when installing locally, they may cause some mismatch dependency collisions.
If you have installed Bit locally, please remove it, and install it as a global dependency.
p.s the error you got with POSIX is OK, it's an optional dependency which works only on *nix platforms, so it's ok that it fails on windows (it shouldn't affect anything).
Hi @GiladShoham
Thank you for your reply.
bit-bin was installed globally, still I removed and globally added again using yarn and still have same error.
can you check in your local node_modules if there is bit-bin there as well? if yes can you try remove them? any way I'm working to reproduce it. if you can give me a skeleton project in github which I can reproduce this problem it will be great.
it works for me after reinstalling vue globally npm i vue --global
Yup, I was also facing the same problem and running this command npm i vue --global fixes the problem.
Most helpful comment
it works for me after reinstalling vue globally
npm i vue --global