Skip to content

chubei-urus/ncc-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build fails with composite: true

npm i
cd app
npm run build

Output:

> [email protected] build
> ncc build main.ts

ncc: Version 0.38.1
ncc: Compiling file index.js into ESM
ncc: Using [email protected] (local user-provided)
Error: [tsl] ERROR in C:\Users\91474\urus\ncc-demo\app\main.ts(1,23)
      TS6059: File 'C:\Users\91474\urus\ncc-demo\lib\index.ts' is not under 'rootDir' 'C:/Users/91474/urus/ncc-demo/app'. 'rootDir' is expected to contain all source files.
  The file is in the program because:
    Imported via 'lib/index' from file 'C:/Users/91474/urus/ncc-demo/app/main.ts'
    Root file specified for compilation
    at C:\Users\91474\urus\ncc-demo\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:38:1896272
    at C:\Users\91474\urus\ncc-demo\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:38:396262
    at _done (eval at create (C:\Users\91474\urus\ncc-demo\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:21:75523), <anonymous>:9:1)
    at eval (eval at create (C:\Users\91474\urus\ncc-demo\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:21:75523), <anonymous>:34:22)
npm ERR! Lifecycle script `build` failed with error: 
npm ERR! Error: command failed
npm ERR!   in workspace: [email protected]
npm ERR!   at location: C:\Users\91474\urus\ncc-demo\app

Build succeeds with composite: false

In app:

git apply ../composite-false.patch
npm run build

Output:

> [email protected] build
> ncc build main.ts

ncc: Version 0.38.1
ncc: Compiling file index.js into ESM
ncc: Using [email protected] (local user-provided)
0kB  dist\package.json
0kB  dist\index.js
0kB  [1362ms] - ncc 0.38.1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published