i had a error while exec "npm install" at windows os ,help please……

Build started at 2021-11-02T12:06:01.968378
Main binary: d:\Python36\python.exe
Build Options: -Db_ndebug=true -Db_pie=true -Db_staticpic=true -Dbuildtype=release
Python system: Windows
The Meson build system
Version: 0.60.0
Source dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker
Build dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release
Build type: native build
Project name: mediasoup-worker
Project version: undefined

meson.build:1:0: ERROR: Unable to detect linker for compiler “link /logo --version”
stdout:
stderr: link: invalid option – -
Try `link --help’ for more information.

gcc -v

gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)

make -v

GNU Make 3.81
Copyright (C) 2006 Fr
This is free software;
There is NO warranty;
PARTICULAR PURPOSE.

It doesn’t seem like you have followed all of the instructions top to bottom.
On Windows you will use MSVS instead of GCC and Make version doesn’t seem to be the one mentioned in the documentation.

Also please search forum for similar questions, you will find a few topic right on the front page.


this is the MinGW packages

i read the doc for windows , and exec like this.
but,i had the error ,why?

the complete log is next:

PS E:\mediasoup-demo\server\node_modules\mediasoup> npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@typescript-eslint/experimental-utils@5.3.0’,
npm WARN EBADENGINE required: { node: ‘^12.22.0 || ^14.17.0 || >=16.0.0’ },
npm WARN EBADENGINE current: { node: ‘v12.20.0’, npm: ‘7.0.14’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@typescript-eslint/scope-manager@5.3.0’,
npm WARN EBADENGINE required: { node: ‘^12.22.0 || ^14.17.0 || >=16.0.0’ },
npm WARN EBADENGINE current: { node: ‘v12.20.0’, npm: ‘7.0.14’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@typescript-eslint/types@5.3.0’,
npm WARN EBADENGINE required: { node: ‘^12.22.0 || ^14.17.0 || >=16.0.0’ },
npm WARN EBADENGINE current: { node: ‘v12.20.0’, npm: ‘7.0.14’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@typescript-eslint/typescript-estree@5.3.0’,
npm WARN EBADENGINE required: { node: ‘^12.22.0 || ^14.17.0 || >=16.0.0’ },
npm WARN EBADENGINE current: { node: ‘v12.20.0’, npm: ‘7.0.14’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@typescript-eslint/visitor-keys@5.3.0’,
npm WARN EBADENGINE required: { node: ‘^12.22.0 || ^14.17.0 || >=16.0.0’ },
npm WARN EBADENGINE current: { node: ‘v12.20.0’, npm: ‘7.0.14’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘eslint-visitor-keys@3.0.0’,
npm WARN EBADENGINE required: { node: ‘^12.22.0 || ^14.17.0 || >=16.0.0’ },
npm WARN EBADENGINE current: { node: ‘v12.20.0’, npm: ‘7.0.14’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘open-cli@7.0.1’,
npm WARN EBADENGINE required: { node: ‘>=14.13’ },
npm WARN EBADENGINE current: { node: ‘v12.20.0’, npm: ‘7.0.14’ }
npm WARN EBADENGINE }

mediasoup@3.9.0 postinstall
node npm-scripts.js postinstall

npm-scripts.js [INFO] running task “postinstall”
npm-scripts.js [INFO] executing command: node npm-scripts.js worker:build
npm-scripts.js [INFO] running task “worker:build”
npm-scripts.js [INFO] executing command: make -C worker
make: Entering directory `/e/mediasoup-demo/server/node_modules/mediasoup/worker’
/e/mediasoup-demo/server/node_modules/mediasoup/worker/out/pip/bin/meson setup
–buildtype release
-Db_ndebug=true
-Db_pie=true
-Db_staticpic=true
–reconfigure
“”
/e/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release ||
/e/mediasoup-demo/server/node_modules/mediasoup/worker/out/pip/bin/meson setup
–buildtype release
-Db_ndebug=true
-Db_pie=true
-Db_staticpic=true
“”
/e/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release
Directory does not contain a valid build tree:
e:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release
The Meson build system
Version: 0.60.0
Source dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker
Build dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release
Build type: native build
Project name: mediasoup-worker
Project version: undefined

meson.build:1:0: ERROR: Unable to detect linker for compiler “link /logo --version”
stdout:
stderr: link: invalid option – -
Try `link --help’ for more information.

A full log can be found at e:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release\meson-logs\meson-log.txt
make: *** [setup] Error 1
make: Leaving directory `/e/mediasoup-demo/server/node_modules/mediasoup/worker’
npm ERR! code 1
npm ERR! path E:\mediasoup-demo\server\node_modules\mediasoup
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node npm-scripts.js postinstall

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2021-11-02T03_23_49_923Z-debug.log

Did you install and configure MSVS? What version of Make do you have (please attach make -v output as it is printed)?

yes,i install the msvs 2017 and setted.

path contained:

  • C:\MinGW\msys\1.0\bin
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64

and the make -v installed by MinGW is next:
image

It might be caused by extra packages installed. Make sure there is no link.exe in C:\MinGW\msys\1.0\bin or else it might be selected over MSVC’s linker and fail like that.

Yes ,you are right!
there has a ‘link.exe’ in ‘C:\MinGW\msys\1.0\bin’

while i delete it ,and exec npm install ,and i had a new error ……

Build started at 2021-11-02T13:27:22.910235
Main binary: d:\Python36\python.exe
Build Options: -Db_ndebug=true -Db_pie=true -Db_staticpic=true -Dbuildtype=release
Python system: Windows
The Meson build system
Version: 0.60.0
Source dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker
Build dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release
Build type: native build
Project name: mediasoup-worker
Project version: undefined
Sanity testing C compiler: cl
Is cross compiler: False.
Sanity check compiler command line: cl sanitycheckc.c /Fesanitycheckc.exe /MD /nologo /showIncludes /utf-8 /link
Sanity check compile stdout:
sanitycheckc.c
LINK : fatal error LNK1104: �޷����ļ���MSVCRT.lib��


Sanity check compile stderr:


meson.build:1:0: ERROR: Compiler cl can not compile programs.

Yep, now it seems like MSVS environment wasn’t configured, this is likely also a reason why you had linker errors in the first place. Adding paths that are not mentioned in the installation guide is not a replacement for those instructions.

so sorry,
In addition to the configurations in the description, I don’t know what else needs to be configured.
can you help me? thank you so mouch!

i tried again followed all of the instructions top to bottom.

1. node -v ----------v12.20.0
2.python -v ----------python 3.6.8 with PIP
3.MinGW (GNU make)



4.installed MSVS,and setted path like instructions


5.while i exec ‘npm install’ ,then error is this:

Build started at 2021-11-02T16:52:35.926418
Main binary: c:\Users\Administrator\AppData\Local\Programs\Python\Python36\python.exe
Build Options: -Db_ndebug=true -Db_pie=true -Db_staticpic=true -Dbuildtype=release
Python system: Windows
The Meson build system
Version: 0.60.0
Source dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker
Build dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release
Build type: native build
Project name: mediasoup-worker
Project version: undefined

meson.build:1:0: ERROR: Unknown compiler(s): [[‘cl’]]
The following exception(s) were encountered:
Running “cl /?” gave “[WinError 2] 系统找不到指定的文件。”
6. i added a var to path like this:

now ,i try exec ‘npm install’ ,i had the error :

> Build started at 2021-11-02T16:55:53.394534
> Main binary: c:\Users\Administrator\AppData\Local\Programs\Python\Python36\python.exe
> Build Options: -Db_ndebug=true -Db_pie=true -Db_staticpic=true -Dbuildtype=release
> Python system: Windows
> The Meson build system
> Version: 0.60.0
> Source dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker
> Build dir: e:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release
> Build type: native build
> Project name: mediasoup-worker
> Project version: undefined
> Sanity testing C compiler: cl
> Is cross compiler: False.
> Sanity check compiler command line: cl sanitycheckc.c /Fesanitycheckc.exe /MD /nologo /showIncludes /utf-8 /link
> Sanity check compile stdout:
> sanitycheckc.c
> LINK : fatal error LNK1104: �޷����ļ���MSVCRT.lib��
> 
> -----
> Sanity check compile stderr:
> 
> -----
> 
> meson.build:1:0: ERROR: Compiler cl can not compile programs.

so,What do I need to do?
please help me ,thanks