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

Error: Could not find a declaration file for module 'ws'. '/daf/examples/expressjs-ethr/node_modules/ws/index.js' implicitly has an 'any' type. #91

Closed
Muhammad-Altabba opened this issue Feb 26, 2020 · 1 comment

Comments

@Muhammad-Altabba
Copy link

/daf/examples/expressjs-ethr$ yarn build
yarn run v1.21.1
$ tsc
src/framework.ts:18:16 - error TS7016: Could not find a declaration file for module 'ws'. '/daf/examples/expressjs-ethr/node_modules/ws/index.js' implicitly has an 'any' type.
  Try `npm install @types/ws` if it exists or add a new declaration (.d.ts) file containing `declare module 'ws';`

18 import ws from 'ws'
                  ~~~~

Found 1 error.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
/daf/examples/expressjs-ethr$ yarn add @types/ws
yarn add v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ @types/ws@7.2.2
info All dependencies
└─ @types/ws@7.2.2
Done in 5.83s.
/daf/examples/expressjs-ethr$ yarn build
yarn run v1.21.1
$ tsc
Done in 6.67s.
@simonas-notcat
Copy link
Contributor

Thanks for raising this issue. I've fixed it master

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