microsoft / azure-devops-extension-sample

Sample web extension for Azure DevOps
MIT License
235 stars 154 forks source link

npm run build error #130

Open Julien-Marpault opened 1 year ago

Julien-Marpault commented 1 year ago

just cloned the repo, launched npm i then npm run build

npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated source-map-resolve@0.5.2: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Azure DevOps\\Extensions\\MicrosoftSamples\\node_modules',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules\@jest'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Azure DevOps\\Extensions\\MicrosoftSamples\\node_modules\\@jest'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Azure DevOps\\Extensions\\MicrosoftSamples\\node_modules\\tfx-cli',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules\tfx-cli\_build\exec\extension\_lib'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Azure DevOps\\Extensions\\MicrosoftSamples\\node_modules\\tfx-cli\\_build\\exec\\extension\\_lib'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli   'C:\\Azure DevOps\\Extensions\\MicrosoftSamples\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@19.7.0 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error
npm ERR! gyp verb find Python checking if "python" can be used
npm ERR! gyp verb find Python - executing "python" to get executable path
npm ERR! gyp verb find Python - executable path is "C:\Python311\python.exe"
npm ERR! gyp verb find Python - executing "C:\Python311\python.exe" to get version
npm ERR! gyp verb find Python - version is "3.11.0"
npm ERR! gyp info find Python using Python version 3.11.0 found at "C:\Python311\python.exe"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 19.7.0
npm ERR! gyp verb command install [ '19.7.0' ]
npm ERR! gyp verb install input version string "19.7.0"
npm ERR! gyp verb install installing version: 19.7.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 19.7.0
npm ERR! gyp verb build dir attempting to create "build" dir: C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules\node-sass\build
npm ERR! gyp verb build dir "build" dir needed to be created? C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules\node-sass\build
npm ERR! gyp verb find VS msvs_version not set from command line or npm config
npm ERR! gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp verb find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
npm ERR! gyp verb find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Preview"
npm ERR! gyp verb find VS checking VS2019 (16.11.33328.57) found at:
npm ERR! gyp verb find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp verb find VS - found "Visual Studio C++ core features"
npm ERR! gyp verb find VS - found VC++ toolset: v142
npm ERR! gyp verb find VS - found Windows SDK: 10.0.19041.0
npm ERR! gyp info find VS using VS2019 (16.11.33328.57) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp ERR! UNCAUGHT EXCEPTION
npm ERR! gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
npm ERR! gyp ERR! stack     at createConfigFile (C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules\node-gyp\lib\configure.js:117:21)
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
npm ERR! gyp ERR! System Windows_NT 10.0.22621
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Azure DevOps\\Extensions\\MicrosoftSamples\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules\node-sass
npm ERR! gyp ERR! node -v v19.7.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! Build failed with error code: 7

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Julien\AppData\Local\npm-cache\_logs\2023-03-09T22_39_13_320Z-debug-0.log
Julien-Marpault commented 1 year ago

It seems that an update of some packages is needed. The packages in this repo are outdated

levangode commented 1 year ago

experiencing same issue