-
Notifications
You must be signed in to change notification settings - Fork 292
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
Typescript with paths
option breaks every deploy
#291
Comments
paths
option breaks every deploy
@pie6k |
https://github.com/zeit/ncc/blob/master/src/index.js#L63 - it seems like you're using it already, but it's not working |
Hmm, looking at this again, if I run:
execution does complete fine for me with this. Can you share an exact ncc replication of the bug? Otherwise, perhaps this isn't an |
Running build with ncc seems to work, but deploying it to
You can replicate it by
and then go to generated url. As soon as custom path import is removed from the code - it works. Error says it cannot load this file: https://github.com/zeit/now-builders/blob/master/packages/now-node/src/launcher.ts It is loaded something like (https://github.com/zeit/now-builders/blob/master/packages/now-node/src/index.ts#L104)
Which suggests that maybe injecting ts-paths plugin to node resolution might break this custom loading of file here. Just guessing. But that could be reason why building it with https://www.npmjs.com/package/tsconfig-paths - here is docs of tsconfig-paths plugin and it says it's modify node resolution. Maybe there is some conflict here. hard to tell for me where is the root cause of this. |
I'm closing because this does not appear to be a bug with I followed the steps to reproduce and it works fine locally. Let's continue this discussion in the |
If I add typescript
paths
totsconfig
and try to import using them, any example fromnow-examples
breaks the deploy.Example repo:
https://github.com/pie6k/zeit-now-typescript-broken-example
Reproduction
now
Actual result
(logs) - https://nodejs-koa-ts-k14ww3xqd.now.sh/_logs
I've tried with working examples from
now-examples
As soon as I've added paths to eg. koa example - it was broken in the same way -
Koa example:
https://github.com/pie6k/zeit-now-typescript-broken-example/tree/7bd024e3aaf61b7e0cc8f71412e29eed85deab7e/nodejs-koa-ts - example repo (folder
nodejs-koa-ts
->>default.ts
route) - same steps for reproduction.The text was updated successfully, but these errors were encountered: