我有這個已經作業了一年多的 github 操作作業流程。當我到達運行“npm install”的步驟時,突然出現錯誤。我真的不知道為什么會觸發錯誤。真的會感謝某人的幫助,或者至少只是將我指向正確的方向。如果您需要更多資料,請告訴我,我將編輯這個問題 已經坐了 2 天了。
我試過更新一些包和 npm update 命令。但沒有好處
Run npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated uuid@3.4.0: 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 deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14 . Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14 . Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14 . Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! make: Entering directory '/home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-sass/build'
npm ERR! g '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-
(此處之間還有一些錯誤訊息,但由于許多字符而不得不洗掉)
npm ERR! remove_cv
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: note: suggested alternative: ‘remove_cv’
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:63: note: suggested alternative: ‘herror’
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~
npm ERR! herror
npm ERR! make: *** [Release/obj.target/binding/src/binding.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.4.0-1064-azure
npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-12-13T20_05_37_396Z-debug.log
Error: Process completed with exit code 1.
uj5u.com熱心網友回復:
看起來您的專案中的某些內容正在使用node-sass,其中包含已棄用的 libsass
如果它是直接依賴項,您可以切換到Dart Sass,并且大多數情況下應該可以正常作業。如果它是需要的傳遞依賴項node-sass,您可以嘗試通過更新依賴于它的直接依賴項來更新它。或者,如果您使用的是紗線,則可以嘗試使用選擇性版本解析度進行更改
如果您無法切換到 usingdart-sass并且不得不處理 C gyp 構建錯誤,我可能會檢查以確保您使用的特定版本的 node-sass 與您當前擁有的當前 C 編譯器兼容安裝。也許你的編譯器變得太舊了,因為libsass(反過來,node-sass)決定提高他們的語言要求?
編輯:嘗試使用此技術(因為您使用的是 npm)將node-sassvue-mj-daterangepicker 中的內容決議為其他內容。您可以更改為更新版本或使用“dart-sass”包。如果使用后者,g 不會出錯,因為 dart-sass 不使用 c 。你也可以使用“sass”包,因為sass和dart-sassnpm pacakges 本質上是一樣的
也許你的package.json......(未測驗)中的類似內容
"resolutions": {
"node-sass": "https://registry.npmjs.org/node-sass/-/node-sass-7.0.0.tgz"
},
"scripts": {
"preinstall": "npx npm-force-resolutions"
}
或者
"resolutions": {
"node-sass": "https://registry.npmjs.org/dart-sass/-/dart-sass-1.25.0.tgz"
},
"scripts": {
"preinstall": "npx npm-force-resolutions"
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/381327.html
標籤:猛击 github 新产品经理 安装 github-actions
