Skip to content

[email protected] doesn't have newLine compiler option #5968

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

Closed
yoav-zibin opened this issue Dec 7, 2015 · 3 comments
Closed

[email protected] doesn't have newLine compiler option #5968

yoav-zibin opened this issue Dec 7, 2015 · 3 comments

Comments

@yoav-zibin
Copy link

The newLine option is documented here:
https://github.com/Microsoft/TypeScript/wiki/Compiler-Options

--newLine Use the specified end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."

I have this line in my tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": false,
"removeComments": false,
"rootDir": ".",
"outDir": "ts_output_readonly_do_NOT_change_manually/",
"sourceMap": false,
"noLib": false,
"newLine": "CRLF"
},

But when I run tsc it complains about Unknown compiler option 'newLine'

yzibin-macbookpro2:multiplayer-games-web yzibin$ npm install typescript --save-dev
[email protected] node_modules/typescript
yzibin-macbookpro2:multiplayer-games-web yzibin$ tsc
error TS5023: Unknown compiler option 'newLine'.
yzibin-macbookpro2:multiplayer-games-web yzibin$ tsc --newLine CRLF
error TS5023: Unknown compiler option 'newline'.
yzibin-macbookpro2:multiplayer-games-web yzibin$ tsc --version
message TS6029: Version 1.5.0-beta

@yoav-zibin
Copy link
Author

Ok, it was a version issue :)

I got confused between typescript and tsc.

And I had different versions of tsc installed (locally and globally):
yzibin-macbookpro2:multiplayer-games-web yzibin$ ./node_modules/tsc/bin/tsc -version
message TS6029: Version 1.5.3
yzibin-macbookpro2:multiplayer-games-web yzibin$ tsc -version
message TS6029: Version 1.5.0-beta

I did
sudo npm install tsc -g
which solved the problem !

@blakeembrey
Copy link
Contributor

@yoav-zibin tsc isn't the right package either (it's https://www.npmjs.com/package/tsc), it should probably have been npm install -g typescript.

@yoav-zibin
Copy link
Author

Thanks! Now I finally have the correct version:
yzibin-macbookpro2:multiplayer-games-web yzibin$ tsc --version
message TS6029: Version 1.7.3

It's interesting the other project (tsc) got formed in order to give stable APIs.
It's pretty far behind: message TS6029: Version 1.5.3
I guess in the past you made incompatible changes a lot.
Thanks again :)

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants