将节点6.10.3安装为NPM依赖项

处理使用无服务器框架部署到AWS Lambda的项目 ,我希望运行AWS Lambda上可用节点的相同版本 – 即节点6.10.3。 添加到“引擎”没有任何作用,所以我也把它添加到“依赖” ,但安装该依赖总是失败:

> node@6.10.3 preinstall /Users/ssterling3/Documents/2017/IIT/Apps/Student Dashboard/mobile-dashboard/node_modules/node > node installArchSpecificPackage npm ERR! code ETARGET npm ERR! notarget No matching version found for node-darwin-x64@6.10.3 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! A complete log of this run can be found in: npm ERR! /Users/ssterling3/.npm/_logs/2017-09-15T20_58_25_281Z-debug.log module.js:471 throw err; ^ Error: Cannot find module 'node-darwin-x64/package.json' at Function.Module._resolveFilename (module.js:469:15) at Function.resolve (internal/module.js:27:19) at ChildProcess.<anonymous> (/Users/ssterling3/Documents/2017/IIT/Apps/Student Dashboard/mobile-dashboard/node_modules/node-bin-setup/index.js:18:27) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:886:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node@6.10.3 preinstall: `node installArchSpecificPackage` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node@6.10.3 preinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/ssterling3/.npm/_logs/2017-09-15T20_58_25_350Z-debug.log 

这似乎是最新日志文件的相关部分:

 59 silly preinstall node@6.10.3 60 info lifecycle node@6.10.3~preinstall: node@6.10.3 61 verbose lifecycle node@6.10.3~preinstall: unsafe-perm in lifecycle true 62 verbose lifecycle node@6.10.3~preinstall: PATH: /opt/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/ssterling3/Documents/2017/IIT/Apps/Student Dashboard/mobile-dashboard/node_modules/node/node_modules/.bin:/Users/ssterling3/Documents/2017/IIT/Apps/Student Dashboard/mobile-dashboard/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/munki:/Users/ssterling3/bin:/opt/local/bin/:/Users/ssterling3/.npm-global/bin/:/Users/ssterling3/.gem/ruby/2.4.0/bin/ 63 verbose lifecycle node@6.10.3~preinstall: CWD: /Users/ssterling3/Documents/2017/IIT/Apps/Student Dashboard/mobile-dashboard/node_modules/node 64 silly lifecycle node@6.10.3~preinstall: Args: [ '-c', 'node installArchSpecificPackage' ] 65 silly lifecycle node@6.10.3~preinstall: Returned: code: 1 signal: null 66 info lifecycle node@6.10.3~preinstall: Failed to exec preinstall script 67 verbose unlock done using /Users/ssterling3/.npm/_locks/staging-9795425667a03fed.lock for /Users/ssterling3/Documents/2017/IIT/Apps/Student Dashboard/mobile-dashboard/node_modules/.staging 68 verbose stack Error: node@6.10.3 preinstall: `node installArchSpecificPackage` 68 verbose stack Exit status 1 68 verbose stack at EventEmitter.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16) 68 verbose stack at emitTwo (events.js:106:13) 68 verbose stack at EventEmitter.emit (events.js:191:7) 68 verbose stack at ChildProcess.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 68 verbose stack at emitTwo (events.js:106:13) 68 verbose stack at ChildProcess.emit (events.js:191:7) 68 verbose stack at maybeClose (internal/child_process.js:886:16) 68 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 69 verbose pkgid node@6.10.3 70 verbose cwd /Users/ssterling3/Documents/2017/IIT/Apps/Student Dashboard/mobile-dashboard 71 verbose Darwin 16.7.0 72 verbose argv "/opt/local/bin/node" "/opt/local/bin/npm" "install" "node@6.10.3" 73 verbose node v6.10.3 74 verbose npm v5.4.0 75 error code ELIFECYCLE 76 error errno 1 77 error node@6.10.3 preinstall: `node installArchSpecificPackage` 77 error Exit status 1 78 error Failed at the node@6.10.3 preinstall script. 78 error This is probably not a problem with npm. There is likely additional logging output above. 79 verbose exit [ 1, true ] 

它看起来像试图获取包的特定于平台的变体,而服务器没有它。

没有其他依赖项(或devDependencies)受到影响。

这是macOS Sierra 10.12.6(16G29), MacPorts 2.4.1,macports nodejs6 @ 6.10.3_0和macports npm5 @ 5.4.0_0。

  • npmjs.com是否真的没有匹配的版本?
  • 它是否可以从其他来源获得?
  • 有什么我可以做的,以帮助npmjs.com使其可用?