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

Missing @shopify/polaris dependency when developing in TypeScript. #19

Closed
buggy opened this issue Apr 24, 2017 · 1 comment
Closed

Missing @shopify/polaris dependency when developing in TypeScript. #19

buggy opened this issue Apr 24, 2017 · 1 comment

Comments

@buggy
Copy link

buggy commented Apr 24, 2017

Issue summary

Missing NPM dependency when developing in TypeScript.

Expected behavior

After installing Polaris using

npm install @shopify/polaris --save

I expect to be able to compile applications using the TypeScript compiler.

Actual behavior

When running tsc the following error is produced:

node_modules/@shopify/polaris/types/components/Icon/Icon.d.ts(2,27): error TS2307: Cannot find module '@shopify/images'.

Steps to Reproduce the Problem

  1. Create a new React app using TypeScript. Verify that it compiles ok
  2. Install Polaris using npm install @shopify/polaris --save
  3. Add some code that uses Polaris (I have a sample at https://github.com/buggy/polaris-demo)
  4. Attempt to compile the application using tsc. You'll now see the error.

This can be fixed by running npm install @shopify/images --save to add the missing dependency.

Specifications

  • Polaris version: 1.0.1
  • React version: 15.5.4
  • Browser: Firefox 53.0
  • Device: Mac
  • Operating System: 10.12.4

NOTE: This repo is only used for reporting issues and new feature requests. We are not accepting pull requests at this point in time.

@buggy buggy changed the title TypeScript support Missing @shopify/polaris dependency when developing in TypeScript. Apr 24, 2017
@lemonmade
Copy link
Member

Thanks for this issue as well, @buggy. This one will also be fixed in 1.0.2.

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