Yarn 2 compatibility/incompatibility?
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- javascript, typescript
Piste de recherche
Commencez par reproduire le problème avec les paramètres de projet Sublime affichés et le paramètre global typescript_tsdk, puis inspectez la sortie de la console Sublime pour la résolution du chemin de tsserver.js. Le travail est terminé lorsque les paramètres Yarn 2 au niveau du projet sont reconnus, que le chemin ne reçoit plus le préfixe d’installation de Sublime Text et que les modules importés sont résolus.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
I'm trying to use this plugin with sublime and yarn 2, but ts "cannot find" imported modules (installed with yarn add for example).
Here are my sublime project settings:
{
"folders": [
{
"path": "."
}
],
"settings": {
"typescript_tsdk": "${project_path}/.yarn/sdks/typescript/lib",
"SublimeLinter.linters.eslint.executable": "${project_path}/.yarn/sdks/eslint/bin/eslint.js",
"SublimeLinter.linters.eslint.selector": "source.ts, source.js - meta.attribute-with-value"
}
}
I got eslint working perfectly with yarn 2, but not this plugin. This config here doesn't even seem to get picked up by the plugin for some reason? I know I'm probably missing something that needs to be done in order to specify the setting at the project level, but the docs for this plugin do not elaborate on the specifications of configuring via project settings.
When I specify typescript_tsdk in my main sublime settings however, then the setting does seem to get picked up (I know this because checking in the console reveals an error from this plugin). The setting gets picked up but it errors with
Error: Cannot find module '/Applications/Sublime Text.app/Contents/MacOS/${project_path}/.yarn/sdks/typescript/lib/tsserver.js'
for some reason it is appending my configured path to /Applications/Sublime Text.app/Contents/MacOS/???
I tried both using the project_path var, and also just a ./ prefix, and both produce the same error and do the same thing (append the path to /Applications/Sublime Text.app/Contents/MacOS/ on load). I'm deferring to the global config (instead of project settings like I originally intended) in order to try to just get it setup temporarily so I could do some work already, but I can't get that working either. Obviously it would be optimal to have it configured at the project level since not every project will use yarn 2/yarn cache though. Any help would be great! Thank you!
- Langage dominant
- JavaScript
- Étoiles
- 1.7k
- Forks
- 236
- Merge moyen
- 21 j 13 h
- PR mergées (30 j)
- 1
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/TypeScript-Sublime-Plugin
-
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
microsoft/TypeScript-Sublime-Plugin#786 · 3 commentaires · 45 réactions ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
microsoft/TypeScript-Sublime-Plugin#782 · 1 réaction ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
microsoft/TypeScript-Sublime-Plugin#781 · 7 commentaires · 1 réaction ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 42/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
microsoft/TypeScript-Sublime-Plugin#779 · 1 commentaire ·
Toutes les issues de microsoft/TypeScript-Sublime-Plugin
Issues similaires
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
babalae/bettergi-scripts-list#3674 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
githubnext/gh-aw-cao#13143 ·