I am new to working with react js and just picked up a sample code and tried to run it using the "yarn" command but the error is
Traceback (most recent call last): File "/usr/bin/yarn", line 32, in import yarnlib ModuleNotFoundError: No module named 'yarnlib'
soo I tried running
which yarn
cat /usr/bin/yarn
#! /usr/bin/python
# Copyright 2013 Lars Wirzenius
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# =*= License: GPL-3 =*=
import cliapp
import collections
import locale
import logging
import os
import re
import shutil
import sys
import tempfile
import time
import ttystatus
import yarnlib
and there on line 32, it has import yarnlib
I don't know how to install yarnlib
can somebody help me out with it?
CodePudding user response:
Did you downloaded the module? If no, go to Terminal (macOS) or Command Prompt (Windows) then enter
pip3 install yarnlib
CodePudding user response:
Thanks to all those who tried to help me out..! The answer here solved my issue
Basically what it did was to remove nodejs and then reinstall it and update the npm