Skip to content
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

yarn clean breaks tslint #28

Closed
semperos opened this issue May 2, 2017 · 2 comments
Closed

yarn clean breaks tslint #28

semperos opened this issue May 2, 2017 · 2 comments

Comments

@semperos
Copy link

semperos commented May 2, 2017

  • I'm submitting a ...
    [x] bug report

  • Summary
    Do the following:

  1. yarn install
  2. yarn test
  3. yarn clean
  4. 💥 yarn test

The yarn clean command is deleting files that tslint needs to work correctly. See the output below:

$ yarn test
yarn test v0.23.3
$ yarn lint && yarn unit && yarn check-coverage
yarn lint v0.23.3
$ tslint src/**/*.ts
module.js:472
    throw err;
    ^
Error: Cannot find module './test/parse'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/dgregoire/tmp/typescript-starter/node_modules/tslint/lib/test.js:28:13)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
error Command failed with exit code 1.
error Command failed with exit code 1.

This is due to known issues with how yarn clean works.

  • Other information

If I add a .yarnclean file up front that has these contents:

!node_modules/tslint/

Then running yarn clean does not delete the needed files and everything appears to work as expected.

@bitjson
Copy link
Owner

bitjson commented Jun 27, 2017

Hey @semperos – thanks for reporting this issue and the fix!

Since yarn clean is a pretty uncommon use case, I'd like to avoid adding the .yarnclean file to the starter project. Ideally this project should only ship with things that >99% of projects need.

Of course, if anyone else runs into this issue, please make a note on this thread, and we can reconsider.

I'm going to close this issue for now, but please let me know if it should be reopened.

@bitjson bitjson closed this as completed Jun 27, 2017
@semperos
Copy link
Author

@bitjson Thanks for taking the time to respond!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants