neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.06k stars 68 forks source link

Installation broken with yarn 1.x #227

Closed pappasam closed 3 years ago

pappasam commented 3 years ago

yarn version: 1.22.10 node version: 15.2.0 environment: ubuntu 20.04

The command yarn install --frozen-lockfile && yarn build generates the following error on latest master:

Watching /home/sroeca/.config/nvim/pack/packager/start/coc-tsserver.git and all sub-directories not excluded by your .gitignore. Will not monitor dotfiles.
Found & ignored ./node_modules ; is listed in .gitignore

Starting: clean
node:internal/modules/cjs/loader:922
  throw err;
  ^

Error: Cannot find module '/home/sroeca/.config/nvim/pack/packager/start/coc-tsserver.git/clean'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:15)
    at Function.Module._load (node:internal/modules/cjs/loader:763:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
^C
npm ERR! path /home/sroeca/.config/nvim/pack/packager/start/coc-tsserver.git                                                                                                                                                                                                                
npm ERR! path /home/sroeca/.config/nvim/pack/packager/start/coc-tsserver.git
npm ERR! command failed
npm ERR! signal SIGINT
npm ERR! command sh -c runjs clean
npm ERR! command failed
npm ERR! signal SIGINT
npm ERR! command sh -c npm-run-all clean build

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/sroeca/.npm/_logs/2020-11-13T15_46_50_603Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/sroeca/.npm/_logs/2020-11-13T15_46_50_604Z-debug.log

Verbose error:

0 verbose cli [
0 verbose cli   '/home/sroeca/.asdf/installs/nodejs/15.2.0/bin/node',
0 verbose cli   '/home/sroeca/.asdf/installs/nodejs/15.2.0/lib/node_modules/npm/bin/npm-cli.js',
0 verbose cli   'exec',
0 verbose cli   '--',
0 verbose cli   'run',
0 verbose cli   'clean'
0 verbose cli ]
1 info using npm@7.0.8
2 info using node@v15.2.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/home/sroeca/.asdf/installs/nodejs/15.2.0/lib/node_modules/npm/npmrc Completed in 0ms
5 timing config:load:builtin Completed in 0ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/home/sroeca/.config/nvim/pack/packager/start/coc-tsserver.git/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/home/sroeca/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/home/sroeca/.asdf/installs/nodejs/15.2.0/.npm/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 1ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 6ms
19 verbose npm-session faf26c370f161cdb
20 timing npm:load Completed in 11ms
21 http fetch GET 200 https://registry.yarnpkg.com/run 9ms (from cache)
22 timing arborist:ctor Completed in 1ms
23 timing arborist:ctor Completed in 0ms
24 timing arborist:ctor Completed in 1ms
25 timing command:exec Completed in 18485ms
26 verbose stack Error: command failed
26 verbose stack     at ChildProcess.<anonymous> (/home/sroeca/.asdf/installs/nodejs/15.2.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
26 verbose stack     at ChildProcess.emit (node:events:329:20)
26 verbose stack     at maybeClose (node:internal/child_process:1055:16)
26 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)
27 verbose pkgid coc-tsserver@1.6.0
28 verbose cwd /home/sroeca/.config/nvim/pack/packager/start/coc-tsserver.git
29 verbose Linux 5.4.0-53-generic
30 verbose argv "/home/sroeca/.asdf/installs/nodejs/15.2.0/bin/node" "/home/sroeca/.asdf/installs/nodejs/15.2.0/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "run" "clean"
31 verbose node v15.2.0
32 verbose npm  v7.0.8
33 error path /home/sroeca/.config/nvim/pack/packager/start/coc-tsserver.git
34 error command failed
35 error signal SIGINT
36 error command sh -c runjs clean
37 verbose exit 1
chemzqm commented 3 years ago

Update your yarn

pappasam commented 3 years ago

I believe I'm on the latest version of what is still called "yarn" on npm: https://www.npmjs.com/package/yarn

If you've migrated this project to "yarn version 2.0, AKA berry", it might be helpful to add straightforward instructions for people to put in their vimrc to build from git.

I currently have, as my hook: 'do': 'yarn install --frozen-lockfile && yarn build'. How do you recommend that this be changed for users to build from git when cloning the latest version of coc-tsserver?

pappasam commented 3 years ago

That said, I'm also happy to just manage this plugin using CocInstall, but I assume you might like having users on the development version to raise helpful bug reports for you!