Sh *_*eeb 3 node.js node-modules webpack sharp
我使用sharpand webpackwithnode-loader但出现此错误:
D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:150011\n throw new Error(error);\n ^\n\nError:\nSomething went wrong installing the "sharp" module\n\nnode-loader:\nError: The specified module could not be found.\nD:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server/33c1e48f049ce3285905e286d212a201.node\n\n- Remove the "node_modules/sharp" directory then run\n "npm install --ignore-scripts=false --verbose" and look for errors\n- Consult the installation documentation at https://sharp.pixelplumbing.com/install\n- Search for this error at https://github.com/lovell/sharp/issues\n\n at Object.EmBj (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:150011:9)\n at __webpack_require__ (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:27:30)\n at Object.Tbcg (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:251632:15)\n at __webpack_require__ (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:27:30)\n at Module.dMKD (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:324313:63)\n at __webpack_require__ (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:27:30)\n at Module.mWHM (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:405859:77)\n at __webpack_require__ (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:27:30)\n at Module.WXK/ (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:271250:65)\n at __webpack_require__ (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:27:30)\n at D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:118:18\n at Object.<anonymous> (D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\dist\\cms\\core\\server\\express.js:121:10)\n\xe2\x86\x90[90m at Module._compile (internal/modules/cjs/loader.js:1156:30)\xe2\x86\x90[39m\n\xe2\x86\x90[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)\xe2\x86\x90[39m\n\xe2\x86\x90[90m at Module.load (internal/modules/cjs/loader.js:1000:32)\xe2\x86\x90[39m\n\xe2\x86\x90[90m at Function.Module._load (internal/modules/cjs/loader.js:899:14)\xe2\x86\x90[39m\n\xe2\x86\x90[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)\xe2\x86\x90[39m\n\xe2\x86\x90[90m at internal/main/run_main_module.js:18:47\xe2\x86\x90[39m\nRun Code Online (Sandbox Code Playgroud)\n我sharp从 \'node_modules` 中删除然后重新安装它,但得到了相同的错误
> npm cache clean -f\n> npm i --verbose sharp@latest\nRun Code Online (Sandbox Code Playgroud)\n安装 Sharp 的详细输出是:
\n\nD:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx>npm i --verbose sharp@latest\nnpm info it worked if it ends with ok\nnpm verb cli [\nnpm verb cli \'C:\\\\Program Files\\\\nodejs\\\\node.exe\',\nnpm verb cli \'C:\\\\Users\\\\eldeeb\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\',\nnpm verb cli \'i\',\nnpm verb cli \'--verbose\',\nnpm verb cli \'sharp@latest\'\nnpm verb cli ]\nnpm info using npm@6.9.0\nnpm info using node@v12.16.2\nnpm verb npm-session c41d87c77d3d7180\nnpm http fetch GET 200 https://registry.npmjs.org/sharp 1417ms\nnpm http fetch GET 200 https://registry.npmjs.org/sharp/-/sharp-0.27.0.tgz 644ms\nnpm timing stage:loadCurrentTree Completed in 6364ms\nnpm timing stage:loadIdealTree:cloneCurrentTree Completed in 37ms\nnpm timing stage:loadIdealTree:loadShrinkwrap Completed in 1936ms\nnpm http fetch GET 200 https://registry.npmjs.org/array-flatten 218ms\nnpm http fetch GET 200 https://registry.npmjs.org/array-flatten/-/array-flatten-3.0.0.tgz 278ms\nnpm http fetch GET 200 https://registry.npmjs.org/prebuild-install 507ms\nnpm http fetch GET 200 https://registry.npmjs.org/npmlog 511ms\nnpm http fetch GET 200 https://registry.npmjs.org/simple-get 545ms\nnpm http fetch GET 200 https://registry.npmjs.org/tar-fs 638ms\nnpm http fetch GET 200 https://registry.npmjs.org/semver 643ms\nnpm http fetch GET 200 https://registry.npmjs.org/node-addon-api 654ms\nnpm http fetch GET 200 https://registry.npmjs.org/detect-libc 659ms\nnpm http fetch GET 200 https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.0.0.tgz 156ms\nnpm http fetch GET 200 https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz 158ms\nnpm http fetch GET 200 https://registry.npmjs.org/simple-get/-/simple-get-4.0.0.tgz 151ms\nnpm http fetch GET 200 https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz 468ms\nnpm http fetch GET 200 https://registry.npmjs.org/semver/-/semver-7.3.4.tgz 471ms\nnpm http fetch GET 200 https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz 464ms\nnpm http fetch GET 200 https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz 644ms\nnpm http fetch GET 200 https://registry.npmjs.org/are-we-there-yet 122ms\nnpm http fetch GET 200 https://registry.npmjs.org/gauge 306ms\nnpm http fetch GET 200 https://registry.npmjs.org/console-control-strings 319ms\nnpm http fetch GET 200 https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz 424ms\nnpm http fetch GET 200 https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz 436ms\nnpm http fetch GET 200 https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz 626ms\nnpm http fetch GET 200 https://registry.npmjs.org/delegates 182ms\nnpm http fetch GET 200 https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz 355ms\nnpm http fetch GET 200 https://registry.npmjs.org/has-unicode 150ms\nnpm http fetch GET 200 https://registry.npmjs.org/wide-align 158ms\nnpm http fetch GET 200 https://registry.npmjs.org/strip-ansi 166ms\nnpm http fetch GET 200 https://registry.npmjs.org/string-width 170ms\nnpm http fetch GET 200 https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz 216ms\nnpm http fetch GET 200 https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz 232ms\nnpm http fetch GET 200 https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz 242ms\nnpm http fetch GET 200 https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz 323ms\nnpm http fetch GET 200 https://registry.npmjs.org/code-point-at 248ms\nnpm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 260ms\nnpm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz 335ms\nnpm http fetch GET 200 https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz 364ms\nnpm http fetch GET 200 https://registry.npmjs.org/number-is-nan 221ms\nnpm http fetch GET 200 https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz 198ms\nnpm http fetch GET 200 https://registry.npmjs.org/ansi-regex 294ms\nnpm http fetch GET 200 https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz 235ms\nnpm http fetch GET 200 https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz 129ms\nnpm http fetch GET 200 https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz 659ms\nnpm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz 673ms\nnpm http fetch GET 200 https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz 167ms\nnpm http fetch GET 200 https://registry.npmjs.org/expand-template 196ms\nnpm http fetch GET 200 https://registry.npmjs.org/which-pm-runs 441ms\nnpm http fetch GET 200 https://registry.npmjs.org/noop-logger 445ms\nnpm http fetch GET 200 https://registry.npmjs.org/node-abi 449ms\nnpm http fetch GET 200 https://registry.npmjs.org/napi-build-utils 456ms\nnpm http fetch GET 200 https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz 448ms\nnpm http fetch GET 200 https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz 263ms\nnpm http fetch GET 200 https://registry.npmjs.org/mkdirp-classic 473ms\nnpm http fetch GET 200 https://registry.npmjs.org/github-from-package 479ms\nnpm http fetch GET 200 https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz 549ms\nnpm http fetch GET 200 https://registry.npmjs.org/node-abi/-/node-abi-2.19.3.tgz 557ms\nnpm http fetch GET 200 https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz 575ms\nnpm http fetch GET 200 https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz 580ms\nnpm http fetch GET 200 https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz 561ms\nnpm http fetch GET 200 https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz 571ms\nnpm http fetch GET 200 https://registry.npmjs.org/semver/-/semver-5.7.1.tgz 336ms\nnpm http fetch GET 200 https://registry.npmjs.org/simple-concat 280ms\nnpm http fetch GET 200 https://registry.npmjs.org/decompress-response 299ms\nnpm http fetch GET 200 https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz 131ms\nnpm http fetch GET 200 https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz 147ms\nnpm http fetch GET 200 https://registry.npmjs.org/mimic-response 213ms\nnpm http fetch GET 200 https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz 183ms\nnpm http fetch GET 200 https://registry.npmjs.org/tar-stream 206ms\nnpm http fetch GET 200 https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz 293ms\nnpm http fetch GET 200 https://registry.npmjs.org/fs-constants 162ms\nnpm http fetch GET 200 https://registry.npmjs.org/bl 202ms\nnpm http fetch GET 200 https://registry.npmjs.org/readable-stream 228ms\nnpm http fetch GET 200 https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz 188ms\nnpm http fetch GET 200 https://registry.npmjs.org/bl/-/bl-4.0.3.tgz 157ms\nnpm http fetch GET 200 https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz 154ms\nnpm http fetch GET 200 https://registry.npmjs.org/buffer 858ms\nnpm http fetch GET 200 https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz 159ms\nnpm http fetch GET 200 https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz 245ms\nnpm http fetch GET 200 https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz 105ms\nnpm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 17386ms\nnpm timing stage:loadIdealTree Completed in 20212ms\nnpm timing stage:generateActionsToTake Completed in 251ms\nnpm verb correctMkdir C:\\Users\\eldeeb\\AppData\\Roaming\\npm-cache\\_locks correctMkdir not in flight; initializing\nnpm verb makeDirectory C:\\Users\\eldeeb\\AppData\\Roaming\\npm-cache\\_locks creation not in flight; initializing\nnpm verb makeCacheDir UID & GID are irrelevant on win32\nnpm verb lock using C:\\Users\\eldeeb\\AppData\\Roaming\\npm-cache\\_locks\\staging-ff976866a950c511.lock for D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\node_modules\\.stag\ning\nnpm http fetch GET 200 https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz 250ms\nnpm http fetch GET 200 https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz 260ms\nnpm http fetch GET 200 https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz 255ms\nnpm timing action:extract Completed in 304ms\nnpm info lifecycle undefined~preuninstall: undefined\nnpm info lifecycle undefined~uninstall: undefined\nnpm timing action:unbuild Completed in 10ms\nnpm timing action:remove Completed in 0ms\nnpm timing action:finalize Completed in 60ms\nnpm timing action:refresh-package-json Completed in 105ms\nnpm info lifecycle array-flatten@3.0.0~preinstall: array-flatten@3.0.0\nnpm info lifecycle semver@7.3.4~preinstall: semver@7.3.4\nnpm info lifecycle sharp@0.27.0~preinstall: sharp@0.27.0\nnpm timing action:preinstall Completed in 17ms\nnpm info linkStuff array-flatten@3.0.0\nnpm info linkStuff semver@7.3.4\nnpm verb linkBins [\nnpm verb linkBins { semver: \'bin/semver.js\' },\nnpm verb linkBins \'D:\\\\Downloads\\\\__projects\\\\dev\\\\NodeJs\\\\@eng-dibo\\\\ngx\\\\node_modules\\\\sharp\\\\node_modules\\\\.bin\',\nnpm verb linkBins false\nnpm verb linkBins ]\nnpm info linkStuff sharp@0.27.0\nnpm timing action:build Completed in 70ms\nnpm info lifecycle array-flatten@3.0.0~install: array-flatten@3.0.0\nnpm info lifecycle semver@7.3.4~install: semver@7.3.4\nnpm info lifecycle sharp@0.27.0~install: sharp@0.27.0\n\n> sharp@0.27.0 install D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\node_modules\\sharp\n> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)\n\ninfo sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-win32-x64.tar.br\ninfo sharp Creating D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\node_modules\\sharp\\build\\Release\ninfo sharp Copying DLLs from D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\node_modules\\sharp\\vendor\\8.10.5\\lib to D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\nod\ne_modules\\sharp\\build\\Release\nprebuild-install info begin Prebuild-install version 6.0.0\nprebuild-install info looking for cached prebuild @ C:\\Users\\eldeeb\\AppData\\Roaming\\npm-cache\\_prebuilds\\9cc5aa-sharp-v0.27.0-napi-v3-win32-x64.tar.gz\nprebuild-install info found cached prebuild\nprebuild-install info unpacking @ C:\\Users\\eldeeb\\AppData\\Roaming\\npm-cache\\_prebuilds\\9cc5aa-sharp-v0.27.0-napi-v3-win32-x64.tar.gz\nprebuild-install info unpack resolved to D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\node_modules\\sharp\\build\\Release\\sharp.node\nprebuild-install info install Successfully installed prebuilt binary!\nnpm verb lifecycle sharp@0.27.0~install: unsafe-perm in lifecycle true\nnpm verb lifecycle sharp@0.27.0~install: PATH: C:\\Users\\eldeeb\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;D:\\Downloads\\__projects\\dev\\No\ndeJs\\@eng-dibo\\ngx\\node_modules\\sharp\\node_modules\\.bin;D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\node_modules\\.bin;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Pr\nogram Files\\Intel\\iCLS Client\\;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\\nProgram Files (x86)\\WinMerge;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program\nFiles (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\Skype\\Phone\\;C:\\\nProgram Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\nodejs\\;C:\\Program Files (x86)\\Yar\nn\\bin\\;C:\\Program Files\\heroku\\bin;C:\\Users\\eldeeb\\AppData\\Roaming\\npm;C:\\Users\\eldeeb\\AppData\\Local\\atom\\bin;C:\\Users\\eldeeb\\AppData\\Local\\Yarn\\bin\nnpm verb lifecycle sharp@0.27.0~install: CWD: D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\node_modules\\sharp\nnpm timing audit submit Completed in 6102ms\nnpm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 6102ms\nnpm timing audit body Completed in 1ms\nnpm timing action:install Completed in 30506ms\nnpm info lifecycle array-flatten@3.0.0~postinstall: array-flatten@3.0.0\nnpm info lifecycle semver@7.3.4~postinstall: semver@7.3.4\nnpm info lifecycle sharp@0.27.0~postinstall: sharp@0.27.0\nnpm timing action:postinstall Completed in 9ms\nnpm verb unlock done using C:\\Users\\eldeeb\\AppData\\Roaming\\npm-cache\\_locks\\staging-ff976866a950c511.lock for D:\\Downloads\\__projects\\dev\\NodeJs\\@eng-dibo\\ngx\\node_module\ns\\.staging\nnpm timing stage:executeActions Completed in 31157ms\nnpm timing stage:rollbackFailedOptional Completed in 19ms\nnpm timing stage:runTopLevelLifecycles Completed in 58678ms\nnpm verb saving [ { name: \'sharp\', spec: \'^0.27.0\', save: \'dependencies\' } ]\nnpm verb shrinkwrap skipping write for package.json because there were no changes.\nnpm info lifecycle undefined~preshrinkwrap: undefined\nnpm info lifecycle undefined~shrinkwrap: undefined\nnpm verb shrinkwrap skipping write for package-lock.json because there were no changes.\nnpm info lifecycle undefined~postshrinkwrap: undefined\nnpm WARN @angular-devkit/build-angular@0.1001.7 requires a peer of @angular/localize@^10.0.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN @angular-devkit/build-angular@0.1001.7 requires a peer of ng-packagr@^10.0.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN @fortawesome/angular-fontawesome@0.6.1 requires a peer of @angular/core@^9.0.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN @fortawesome/angular-fontawesome@0.6.1 requires a peer of tslib@^1.10.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN jsdom@16.4.0 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN ngx-loading@8.0.0 requires a peer of @angular/common@^8.0.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN ngx-loading@8.0.0 requires a peer of @angular/core@^8.0.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN sass-loader@10.0.1 requires a peer of node-sass@^4.0.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN sass-loader@10.0.1 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself.\nnpm WARN webpack-subresource-integrity@1.4.1 requires a peer of html-webpack-plugin@^2.21.0 || ~3 || >=4.0.0-alpha.2 <5 but none is installed. You must install peer depen\ndencies yourself.\nnpm WARN ws@7.4.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.\nnpm WARN ws@7.4.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.\nnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\\webpack-dev-server\\node_modules\\fsevents):\nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64\nnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\\fsevents):\nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64\nnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\\watchpack-chokidar2\\node_modules\\fsevents):\nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any\nnpm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32\nnpm verb notsup SKIPPING OPTIONAL DEP
小智 5
对于有以下错误的人:
"Something went wrong installing the \"sharp\" module",
"",
"Cannot find module '../build/Release/sharp-linux-arm64v8.node'"
Run Code Online (Sandbox Code Playgroud)
和/或使用 M2 Pro,尝试重建两次,以下命令对我有用:
npm install sharp
npm rebuild --platform=linux --arch=x64 sharp
npm rebuild --platform=linux --arch=arm64 sharp
Run Code Online (Sandbox Code Playgroud)
现在发布包可以在 Amazon Lambda 上使用。为确保一切就位,请检查 node_modules 中的目录
node_modules/sharp/build/Release
Run Code Online (Sandbox Code Playgroud)
并检查这些文件是否存在
node_modules/sharp/build/release/sharp-darwin-arm64v8.node
node_modules/sharp/build/release/sharp-linux-x64v8.node
node_modules/sharp/build/release/sharp-linux-arm64v8.node
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14720 次 |
| 最近记录: |