Failed to load jshint library как исправить

Every time Visual Studio Code started or loaded it shows an error message: "Failed to load jshint library. Please install jshint in your workspace folder using 'npm install jshint' or globally usin...

Every time Visual Studio Code started or loaded it shows an error message:
«Failed to load jshint library. Please install jshint in your workspace folder using ‘npm install jshint’ or globally using ‘npm install -g jshint’ and then press Retry«.
Is there any solution available?

Abdollah's user avatar

Abdollah

4,1993 gold badges28 silver badges47 bronze badges

asked May 1, 2016 at 10:18

ratulalahy's user avatar

You’ll need to follow the prompt and install jshint.

For just the workspace

npm install jshint

or

For all your workspaces

npm install -g jshint

answered May 2, 2016 at 15:12

Wade Anderson's user avatar

Wade AndersonWade Anderson

2,4211 gold badge18 silver badges21 bronze badges

6

I had this problem while I had installed jshint using yarn globally (yarn global add jshint). I added the following properties to settings.json for User to solve the problem:

"jshint.packageManager": "yarn",
"jshint.nodePath": "/usr/local/lib/node_modules/"

The first property i.e. jshint.packageManager specifies that yarn is used to manage node packages instead of npm. The second one i.e. jshint.nodePath specifies the path of jshint installation. To check if jshint is loaded successfully, I opened Command pallet ( CTRL + 3) and ran command JSHint: Show output which showed this message in the output:

jshint library loaded from /usr/local/lib/node_modules/jshint/src/jshint.js

It indicated that the problem was resolved. Afterwards, the jshint messages appeared in *.js files.

answered Sep 11, 2019 at 12:12

Abdollah's user avatar

AbdollahAbdollah

4,1993 gold badges28 silver badges47 bronze badges

2

Open cmdr or the Git bash terminal and enter npm install -g jshint, then exit VS code and re-open it.

Malekai's user avatar

Malekai

4,5994 gold badges25 silver badges58 bronze badges

answered Oct 10, 2020 at 21:44

Sahadat Riad's user avatar

For applying the changes to Global scope, and not only to a specific Workspace, use the following command in terminal:-

npm install -g jshint

For a particular workspace, use the following command in terminal:-

npm install jshint

answered Jun 10, 2018 at 15:23

Rakesh Chandra's user avatar

Use sudo before npm install jshint

For the current workspace
sudo npm install jshint
or

For all your workspaces
sudo npm install -g jshint

Using sudo with a command in LINUX/UNIX generally gives you the permissions to root level.
The root user has permission to access, modify or delete almost any file on your computer. Normal user accounts can access, modify or delete fewer files. This restrictions on normal user accounts are to protect your computer from unauthorized and harmful programs or users.

Thus, running the installation command with sudo gives you the permissions of the superuser, and allows you to modify files that your normal user doesn’t have permission to modify.

answered May 27, 2021 at 4:14

Vaibhav Zope's user avatar

Каждый раз, когда код Visual Studio запускается или загружается, он отображает сообщение об ошибке: « Не удалось загрузить библиотеку jshint. Пожалуйста, установите jshint в папку рабочей области, используя ‘npm install jshint’, или глобально, используя ‘npm install -g jshint’, а затем нажмите Retry «. Есть ли доступное решение?

4 ответа

Лучший ответ

Вам нужно будет следовать инструкциям и установить jshint.

Только для рабочего пространства < Код > npm установить jshint

Или

Для всех ваших рабочих мест < Код > npm установить -g jshint


13

Wade Anderson
2 Май 2016 в 15:12

У меня была эта проблема, когда я установил jshint, используя yarn глобально (yarn global add jshint). Я добавил следующие свойства в settings.json для User для решения проблемы:

"jshint.packageManager": "yarn",
"jshint.nodePath": "/usr/local/lib/node_modules/"

Первое свойство, т.е. jshint.packageManager указывает, что yarn используется для управления node пакетами вместо npm. Второй, то есть jshint.nodePath указывает путь к установке jshint. Чтобы проверить, успешно ли загружен jshint, я открыл командный поддон ( CTRL + 3 ) и выполнил команду JSHint: Show output, которая показала это сообщение в выходных данных. :

jshint library loaded from /usr/local/lib/node_modules/jshint/src/jshint.js

Это указывало на то, что проблема была решена. После этого сообщения jshint появились в файлах *.js.


1

Abdollah
11 Сен 2019 в 12:27

Чтобы применить изменения к глобальной области, а не только к определенной рабочей области, используйте следующую команду в терминале: —

npm install -g jshint

Для определенного рабочего пространства используйте следующую команду в терминале: —

npm install jshint


0

Rakesh Chandra
10 Июн 2018 в 15:23

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.

9 / 9 / 0

Регистрация: 04.06.2016

Сообщений: 40

1

VS 2019

Ошибка с валидацией

03.08.2020, 15:56. Показов 1812. Ответов 3


Здравствуйте, у меня возникла данная ошибка при попытке запустить наброски в VS (Vue.js):

Matches multiple schemas when only one must validate.

Сам код launch.json:

JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "version": "0.2.0",
    "configurations": [    
      {
        "type": "chrome",
        "request": "launch",
        "name": "vuejs: chrome",
        "url": "http://localhost:8080",
        "webRoot": "${workspaceFolder}/src",
        "breakOnLoad": true,
        "sourceMapPathOverrides": {
          "webpack:///src/*": "${webRoot}/*"
        }
      },
      {
        "type": "firefox",
        "request": "launch",
        "name": "vuejs: firefox",
        "url": "http://localhost:8080",
        "webRoot": "${workspaceFolder}/src",
        "pathMappings": [{ "url": "webpack:///src/", "path": "${webRoot}/" }]
      }
    ]
  }

VS предложил установить в workspaceFolder — jshint. При данной попытке снова выкидывает ошибку. Мол ошибка в сервере.

Добавлено через 31 минуту
Сделал бэкап-ошибка исчезла:

JSON
1
2
3
4
5
6
7
8
9
10
11
12
{
  "version": "0.2.0",
  "configurations": [
      {
          "type": "chrome",
          "request": "launch",
          "name": "Launch Chrome against localhost",
          "url": "http://localhost:8080",
          "webRoot": "${workspaceFolder}"
      }
  ]
}

В терминале ввёл npm install -g @vue/cli после vue create project-name

После манипуляций снова пишет ошибку

Главный вопрос: Как заставить сие приложение ожить ?

Добавлено через 2 минуты
С Yarn. debuggers. devtools так же не работает

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Понравилась статья? Поделить с друзьями:
  • Failed to load hardware monitor driver как исправить windows 10
  • Failed to launch openocd gdb server error spawn openocd exe enoent
  • Failed to load hardware monitor driver this program must run as administrator как исправить
  • Failed to load game data archeage как исправить
  • Failed to load ffmpeg dll как исправить