-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tfjs-node]Support cnpm registry #3832
Conversation
Pass the url through the environment variable
But for the developer, he does not know this url: https://cdn.npm.taobao.org/dist/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass the url through the environment variable
STORE_BASE_HOST=https://cdn.npm.taobao.org/dist/
const BASE_HOST = process.env.STORE_BASE_HOST;
But for the developer, he does not know this url: https://cdn.npm.taobao.org/dist/.
So is it possible to tell the developer this information in the installation document
Thanks, Is this change pushed?
already pushed |
should i use it like could give a example url of path corresponding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could change it before tfjs-node publish?
@@ -42,8 +42,9 @@ const mkdir = util.promisify(fs.mkdir); | |||
const rename = util.promisify(fs.rename); | |||
const rimrafPromise = util.promisify(rimraf); | |||
|
|||
const BASE_URI = | |||
'https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-'; | |||
const CDN_STORAGE = process.env.CDN_STORAGE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process.env.CND_STORAGE name as process.env.TFJS_NODE_MIRROR may more meaningful
it's seems already published,i track this from a old third node modules😰 pity for that, but we can also use
make it work |
Support taobao npm mirror.
When tfjs-node is installed, it will download files from storage.googleapis.com.
In China, the cnpm tool will be used to solve network problems, and it will proxy the above-mentioned link to the mirror site.
However, when some people only use the parameter (
--registry=https://registry.npm.taobao.org
) to install, they cannot proxy.This pr is to solve this problem: only use the link installed by the parameter (
--registry=https://registry.npm.taobao.org
)This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)