Skip to content

Conversation

@rbelouin
Copy link

@rbelouin rbelouin commented Aug 1, 2017

Description:

I get some compilation errors when using cyclic-router as a dependency. When cloning, installing and testing the project locally; I get the following output:

[rbelouin cyclic-router(master)]% npm install
npm WARN deprecated [email protected]: Use npmjs.com/husky instead, see https://github.com/gtramontina/ghooks/issues/166

> [email protected] install /Users/rbelouin/src/cyclic-router/node_modules/ghooks
> node ./bin/module-install

[email protected] /Users/rbelouin/src/cyclic-router
├── @cycle/[email protected]
…
└── [email protected]
[rbelouin cyclic-router(master)]% npm test

> [email protected] pretest /Users/rbelouin/src/cyclic-router
> npm run lib


> [email protected] lib /Users/rbelouin/src/cyclic-router
> tsc

src/makeRouterDriver.ts(4,23): error TS6137: Cannot import type declaration files. Consider importing 'history' instead of '@types/history'.

npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/rbelouin/.nvm/versions/node/v7.10.0/bin/node" "/Users/rbelouin/.nvm/versions/node/v7.10.0/bin/npm" "run" "lib"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] lib: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] lib script 'tsc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cyclic-router package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cyclic-router
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cyclic-router
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rbelouin/.npm/_logs/2017-08-01T10_44_41_434Z-debug.log
npm ERR! Test failed.  See above for more details.

Even though everything works with tsc 2.3.3, the latest version (2.4.2) complains about makeRouterDriver importing @types/history instead of history. I followed the recommendation, and it works with both versions.

The typescript compiler (tsc 2.4.2) complains about makeRouterDriver importing
'@types/history' instead of 'history'.
@ntilwalli ntilwalli merged commit ed968cf into cyclejs-community:master Aug 3, 2017
@ntilwalli
Copy link
Collaborator

Thanks! Released as 4.0.6

@rbelouin rbelouin deleted the fix-TS6137 branch August 3, 2017 10:37
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

Successfully merging this pull request may close these issues.

2 participants