[英]Throw error whenever attempting to use geoproject command in terminal
I keep getting the same error anytime I try to use the geoproject command. 每当我尝试使用geoproject命令时,都会出现相同的错误。
I have the latest version of node and D3 downloaded. 我已经下载了最新版本的node和D3。
error message: 错误信息:
Parkers-MacBook-Pro-2:proj parkerbarton$ geoproject
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'resolve'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/usr/local/lib/node_modules/d3-geo-projection/bin/resolve.js:2:15)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
tldr; tldr; Just re-install to get the new version of d3-geo-projection.
只需重新安装即可获得d3-geo-projection的新版本。
npm install -g d3-geo-projection
There's an issue for this here: https://github.com/d3/d3-geo-projection/issues/161 这里有一个问题: https : //github.com/d3/d3-geo-projection/issues/161
And there's a fix for this up on a pull request, but it hasn't gotten pulled in yet. 并针对拉取请求对此进行了修复,但尚未将其拉入。 You could wait for the fix or in the meantime you can probably just add 'require' into the same place in {global-install-location}/node_modules/d3-geo-projection/package.json
您可以等待修复,或者在此期间,您可以将'require'添加到{global-install-location} /node_modules/d3-geo-projection/package.json中的同一位置
https://github.com/d3/d3-geo-projection/pull/162/commits/43105df62b784f0645cb3d4cb0b0fa98c8924c87 https://github.com/d3/d3-geo-projection/pull/162/commits/43105df62b784f0645cb3d4cb0b0fa98c8924c87
UPDATE: It's up on 2.6, just re-install d3-geo-projection. 更新:它在2.6上启动,只需重新安装d3-geo-projection。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.