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

Doesn't work with npm dependencies #66

Closed
nripendra opened this issue Aug 11, 2015 · 3 comments
Closed

Doesn't work with npm dependencies #66

nripendra opened this issue Aug 11, 2015 · 3 comments

Comments

@nripendra
Copy link

I have following line in code:

import * as React from 'react';

Getting following error : cannot find module 'react'.

Here react is npm module installed in node_modules folder of project root.

This works fine with other gulp plugin like gulp-typescript..

I have set tsd.json and typings folder correctly.

What may be cause of problem?

@nripendra
Copy link
Author

Ok when I put /// <reference path=".."/> pointing to react.d.ts file in typings folder (in one of my files) it is no more giving this particular error..

Now, I'm getting another error:
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

I tried to solve issue by putting following config in browserify constructor (as suggested in some SO posts)
extensions: ['.ts', '.tsx']
but still doesn't work

@smrq
Copy link
Member

smrq commented Aug 14, 2015

Can you check whether you're running into the Browserify bug mentioned in #60?

@smrq
Copy link
Member

smrq commented Sep 1, 2015

Closing for now, please reopen if you still have an issue, ideally with a repro to work from

@smrq smrq closed this as completed Sep 1, 2015
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