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

Need postinstall script in package.json to build dist/index.js #28

Closed
darcyparker opened this issue Sep 20, 2016 · 3 comments
Closed

Need postinstall script in package.json to build dist/index.js #28

darcyparker opened this issue Sep 20, 2016 · 3 comments

Comments

@darcyparker
Copy link
Contributor

darcyparker commented Sep 20, 2016

Now that dist/* files aren't included in distribution, downstream repos that depend on json-schema-to-typescript are failing with

>> Error: Cannot find module 'json-schema-to-typescript'

I think the cause is that https://github.com/bcherny/json-schema-to-typescript/blob/master/package.json#L5 refers to dist/index.js and this is not in the repo after npm install json-schema-to-typescript.

I speculate this can be resolved by adding postinstall script to your package.json like this: (See https://docs.npmjs.com/misc/scripts) (or something similar to this...)

{
  "scripts": {
    "postinstall": "./node_modules/.bin/gulp dist"
  }
}
@darcyparker
Copy link
Contributor Author

@bcherny
Copy link
Owner

bcherny commented Sep 20, 2016

Good catch - I should have tested this instead of assuming it worked as expected.

Fixed in 2.1.2 (ac26a73).

@bcherny bcherny closed this as completed Sep 20, 2016
@darcyparker
Copy link
Contributor Author

Nice - Thanks.

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