Comments (15)
@Swizec This was it! Solved with brew reinstall watchman
from typescript.
For anyone coming here in the future, it's a watchman issue.
This helps: jestjs/jest#4529
from typescript.
What global version of TS and node?
Have you tried yarn?
from typescript.
Hi @matthewharwood !
Even when you tag your test cases with xit
they will be examined by the TypeScript transpiler to find errors.
After fixing those tests, as @masters3d says, I would recommend you to run yarn test
inside hello-world
folder after running yarn install
(instead of npm test
)
If it doesn't work for you, let us know π
from typescript.
Still failing on my properly hello-world.ts. I uninstalled node_modules and deleted .locks files then yarn installed
then yarn test
and it hangs still.
tsc -v
Version 2.7.2
node -v
v9.4.0
yarn -v
1.5.1
You mentioned to list my node version so...
I also tried to downgrade to node LTS v8.10.0
. On a new hello-world project I ran
npm install -g typescript && yarn
cd into hello-world
yarn
yarn test
$ tsc --noEmit -p . && jest --no-cache
hello-world.test.ts(11,12): error TS2554: Expected 0 arguments, but got 1.
hello-world.test.ts(15,12): error TS2554: Expected 0 arguments, but got 1.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c tsc --noEmit -p . && jest --no-cache
Directory: /Users/matty/exercism/typescript/hello-world
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/matty/exercism/typescript/hello-world/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Here's an abridged log:
Arguments:
/Users/matty/.nvm/versions/node/v8.10.0/bin/node /Users/matty/.nvm/versions/node/v8.10.0/bin/yarn test
PATH:
/Users/matty/.nvm/versions/node/v8.10.0/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Yarn version:
1.5.1
Node version:
8.10.0
Platform:
darwin x64
Trace:
Error: Command failed.
Exit code: 1
Command: sh
Arguments: -c tsc --noEmit -p . && jest --no-cache
Directory: /Users/matty/exercism/typescript/hello-world
Output:
at ProcessTermError.MessageError (/Users/matty/.nvm/versions/node/v8.10.0/lib/node_modules/yarn/lib/cli.js:186:110)
at new ProcessTermError (/Users/matty/.nvm/versions/node/v8.10.0/lib/node_modules/yarn/lib/cli.js:226:113)
at ChildProcess.<anonymous> (/Users/matty/.nvm/versions/node/v8.10.0/lib/node_modules/yarn/lib/cli.js:30281:17)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
Then I fix the code for the tests
class HelloWorld {
static hello( name = 'World' ) {
return `Hello ${name}!`
}
}
export default HelloWorld
I leave the tests cases the same and/or remove the x from xit
:
import HelloWorld from "./hello-world"
describe('Hello World', () => {
it('says hello world with no name', () => {
expect(HelloWorld.hello()).toEqual('Hello, World!')
})
xit('says hello to bob', () => {
expect(HelloWorld.hello('Bob')).toEqual('Hello, Bob!')
})
xit('says hello to sally', () => {
expect(HelloWorld.hello('Sally')).toEqual('Hello, Sally!')
})
})
and no feedback after
$ yarn test
yarn run v1.5.1
$ tsc --noEmit -p . && jest --no-cache
just seems to pause there.
from typescript.
what does yarn install
say?
from typescript.
can you try reinstalling typescript?
#124
from typescript.
Per @vermiculus comment in #124 I ran:
rm -rf ~/exercism/typescript # your exercism directory
npm uninstall -g typescript && npm uninstall -g yarn # if originally installed via npm
rm -rf ~/node_modules/ # remove node modules
brew install typescript yarn
exercism fetch typescript
cd ~/exercism/typescript/hello_world/ # or wherever exercism places the directory
From there I cd ~/exercism/typescript/hello-world
.
The following should be the yarn install
output you asked for:
matty@laptop: ~/exercism/typescript/hello-world
$ yarn install && yarn test
yarn install v1.5.1
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
[4/4] π Building fresh packages...
β¨ Done in 3.41s.
yarn run v1.5.1
$ tsc --noEmit -p . && jest --no-cache
hello-world.test.ts(11,12): error TS2554: Expected 0 arguments, but got 1.
hello-world.test.ts(15,12): error TS2554: Expected 0 arguments, but got 1.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c tsc --noEmit -p . && jest --no-cache
Directory: /Users/matty/exercism/typescript/hello-world
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/matty/exercism/typescript/hello-world/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
matty@laptop: ~/exercism/typescript/hello-world
I fixed the code for the tests again:
class HelloWorld {
static hello( name = 'World' ) {
return `Hello ${name}!`
}
}
export default HelloWorld
Ran same command:
$ yarn install && yarn test
yarn install v1.5.1
[1/4] π Resolving packages...
success Already up-to-date.
β¨ Done in 0.32s.
yarn run v1.5.1
$ tsc --noEmit -p . && jest --no-cache
Still justs hangs here after the yarn test
.
Small update that tsc --noEmit -p .
runs and completes. jest --no-cache
is what seemingly breaks
from typescript.
okay. This may be a mac issue with the new version of ts.
@CRivasGomez Do you happen to have a mac to test this? I am on a windows machine this weekend.
from typescript.
@masters3d I'm a using a mac machine.
I have just tested hello-world
exercise and it works perfectly.
β tsc -v
Version 2.7.2
β yarn -v
1.5.1
β node -v
v9.8.0
β npm -v
5.6.0
from typescript.
@CRivasGomez if you complete the task
class HelloWorld {
static hello( name = 'World' ) {
return `Hello ${name}!`
}
}
export default HelloWorld
Do the tests still run or does it get hung up?
from typescript.
I havenβt been able to reproduce. Sorry. We added Mac builds and they are passing.
from typescript.
@matthewharwood they run perfectly on my mac.
from typescript.
reopen if you feel this has not been addressed.
from typescript.
Installation of fsevent
of version locked in downloaded yarn.lock
file is failed, and installation of subsequent packages are also failed thus causing the hang-on.
Environments:
- macOS: 10.13.5 (17F77)
- node: v10.0.0
- yarn: 1.6.0
- network: Behind China GFW
Deleting the yarn.lock
file before running yarn install
would prevent the problem, but also causes the dependency resolution to run on every new exercise and it really takes a lot of time.
from typescript.
Related Issues (20)
- At least one deadlink in the REPO HOT 1
- Test-Cases of `rational-numbers` exercise satisfied by dummy-implementation
- DnD Character - confused about the purpose and execution of the exercise HOT 4
- [Grade School] Tests fail on a valid approach
- Lack to add documentation references in the exercise instructions. HOT 5
- Instructions for the exercise Secret handshake (typescript exercise #16) are confusing HOT 3
- Spelling issue in Largest Series Product
- [Grade School] Can't use Readonly<> types for later tests HOT 7
- Update Pig Latin tests HOT 1
- `word-count` exercise test not aligned with instructions HOT 1
- ESLint cannot find already installed plugins when linting exercises in local environment HOT 12
- yarn install / yarn test does not work out of the box for typescript exercises HOT 2
- Building a training set of tags for typescript HOT 21
- hello world not work HOT 1
- Deprecated String.prototype.substr() in robot-name.test.ts HOT 1
- Why does two-bucket use both xtest and test.skip ? HOT 1
- Two-Fer exercise skips 2/3 tests with `xit` HOT 2
- 'Robot Name' false positive tests HOT 6
- Exercise Word Count in Typescript. Tests are wrong
- Missing test case for problem "luhn"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript.