-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
Description
TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)
TypeScript compiler relies on node's 'crypto' module unconditionally:
Whereas node's documentation for crypto module explicitly states:
Determining if crypto support is unavailable
It is possible for Node.js to be built without including support for the crypto module. In such cases, calling require('crypto') will result in an error being thrown.let crypto; try { crypto = require('crypto'); } catch (err) { console.log('crypto support is disabled!'); }
That means on a reduced node environment the compiler crashes unnecessarily. By unnecessarily I mean the support for crypto is already optional in the compiler:
Expected behavior:
TSC to work without 'crypto'
Actual behavior:
TSC fails without 'crypto'
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this