Skip to content

Build Error: Go: go.mod file not found & NPM: Unsupport Engine Β #4257

@Eroge-Newton

Description

@Eroge-Newton

I built YCM two years ago on my new laptop(Ubuntu 22.04) and it works fine.
Today, I try to build YCM on a VPS(Ubuntu 22.04) but something wrong.

I want to build go , ts and mono completer, but only mono compiles successfully.

I've looked up issues and installation guides, as well as the detailed compilation guide, but there's not much information that solves the problem.

System and software info:

OS: Ubuntu 22.04.4 LTS 
Memery: 2 GB 
Disk: 20 GB 
Kernel: 6.5.0-18-generic 

Vim: 8.2.3995 
Python: 3.10 
mono: 6.8.0.105 
go: 1.18.1 LTS 
nodejs: 12.22.9 
npm: 8.5.1 

While I trying to compile go:

$ python3 ./install.py --verbose --cs-completer --go-completer --ts-completer

# The ending part
third_party/go/pkg/mod/golang.org/x/tools/[email protected]/internal/golang/comment.go:12:2: package go/doc/comment is not in GOROOT (/usr/lib/go-1.18/src/go/doc/comment)
go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.
$ 

What's more, if just compile TypeScript completer, will get the "Unsupported Engine" warnning message.

$ python3 ./install.py --verbose --cs-completer --ts-completer

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.17' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
$

YCM log:

:Ycm
Printing YouCompleteMe debug information...                                                                                  
-- Resolve completions: Never                                                                                                
-- Client logfile: /tmp/ycm_b8yxng5a.log                                                                                     
-- Server Python interpreter: /usr/bin/python3                                                                               
-- Server Python version: 3.10.12                                                                                            
-- Server has Clang support compiled in: False                                                                               
-- Clang version: None                                                                                                       
-- Extra configuration file found and loaded                                                                                 
-- Extra configuration path: /home/tmp/.vim/plugged/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py                        
-- Server running at: http://127.0.0.1:55357                                                                                 
-- Server process ID: 15438                                                                                                  
-- Server logfiles:                                                                                                          
--   /tmp/ycmd_55357_stdout_b0_ff4bz.log                                                                                     
--   /tmp/ycmd_55357_stderr_aes77liw.log                                                                                     
-- Semantic highlighting supported: True                                                                                     
-- Virtual text supported: False                                                                                             
-- Popup windows supported: True                                                                                             
Press ENTER or type command to continue    



:YcmToggleLogs                                                                                                               
Which logfile do you wish to open (or close if already open)?                                                                
1: tsserver_5hyq8_co.log                                                                                                     
2: ycm_z_d6al82.log                                                                                                          
3: ycmd_37645_stderr_n6x9u6_6.log                                                                                            
4: ycmd_37645_stdout_960a_51t.log                                                                                            
Type number and <Enter> or click with the mouse (q or empty cancels):   

Full log with --verbose :
Full-log--verbose.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions