-
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] Does not work with project references #320
Comments
@screendriver Can you try to reproduce this bug with the latest ncc? npm install -g @zeit/ncc
ncc build src/one/index.js # assuming this is the entry point
node dist/index.js |
I'm not using Or does |
Since I don't have your source code, I can't reproduce the bug. So that's why I'm asking you to run ncc in your project and see if you get an error.
Basically yes and many sources of errors in |
ncc version 0.16.1 produces ncc: Using typescript@3.3.4000 (local user-provided)
Error: Hash: 12a2a6b144c58b5cdcbb
Version: webpack 5.0.0-alpha.9
Time: 1608ms
Built at: 03/21/2019 9:38:02 PM
Asset Size Chunks Chunk Names
index.js 1.71 KiB {404} main
mongodb.d.ts 190 bytes
mongodb.d.ts.map 308 bytes
Entrypoint main = index.js
[823] ./src/one/index.ts 380 bytes {404} [built] [failed] [2 errors]
ERROR in ./src/one/index.ts
Module build failed (from ./node_modules/@zeit/ncc/dist/ncc/loaders/ts-loader.js):
Error: TypeScript emitted no output for /Users/me/project/src/one/index.ts.
at makeSourceMapAndFinish (evalmachine.<anonymous>:1:2894210)
at successLoader (evalmachine.<anonymous>:1:2893770)
at Object.loader (evalmachine.<anonymous>:1:2892441)
ERROR in /Users/me/project/src/one/index.ts
./src/one/index.ts
[tsl] ERROR in /Users/me/project/src/one/index.ts(7,28)
TS6305: Output file '../two/foo' has not been built from source file '/Users/me/project/src/two/foo.ts'.
at compiler.close.n (evalmachine.<anonymous>:3:1349875)
at _promise0.then._result0 (eval at create (evalmachine.<anonymous>:1:349386), <anonymous>:13:1)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
error Command failed with exit code 1. Should I create a test repository for you? By the way: I saw in the output that you are using |
@screendriver Yes, an example repository (preferably the smallest possible) would be of great help!
That sounds painful. One solution you might try is change your {
"builds": [
{ "src": "src/one/index.ts", "use": "@now/node-server", "config": { "bundle": false } }
]
} You would also have to add the |
@styfle I created a very very small repository where you can reproduce it easily 😉 |
@screendriver Thank you! So this issue is currently blocked on the upstream Related Issues |
😱 Oh, that's sad... Project references are really great and I don't understand why they are not so much used out there. But ok, so we have to wait. Should we keep this issue open until it's fixed? |
It looks like ts just added support for
Now we need this to land it cc @guybedford |
@styfle Any update on this? Looks like Happy to help out with this if no one is looking at it. |
@anthonyshort Feel free to submit a PR with implementation and tests 👍 I should also point out that ZEIT Now is no longer using |
I try to deploy one of my TypeScript projects to
ZEIT Now
and get a lot ofModule build failed (from (webpack)/ncc/loaders/ts-loader.js):
errors.Could it be that I'm getting these errors because I'm using project references? Or is this somehow related to #291?
My
tsconfig.json
file looks like this:(every of these directories contain a separate
tsconfig.json
withcomposite
set totrue
).I'm not sure if this is related to zeit/now-builders or to
ncc
🤔The text was updated successfully, but these errors were encountered: