weiran-zsd / dts-cli

Zero-config CLI for TypeScript package development
MIT License
442 stars 23 forks source link

build failed #203

Closed mnsdojo closed 1 year ago

mnsdojo commented 1 year ago

> yarn build
yarn run v1.22.19
$ dts build
/home/manish/Documents/zencss/node_modules/dts-cli/dist/errors/extractErrors.js:39
        throw new Error('Missing options. Ensure you pass --name flag to dts');
              ^

Error: Missing options. Ensure you pass --name flag to dts
    at extractErrors (/home/manish/Documents/zencss/node_modules/dts-cli/dist/errors/extractErrors.js:39:15)
    at createRollupConfig (/home/manish/Documents/zencss/node_modules/dts-cli/dist/createRollupConfig.js:27:77)
    at /home/manish/Documents/zencss/node_modules/dts-cli/dist/createBuildConfigs.js:21:74
    at Array.map (<anonymous>)
    at createBuildConfigs (/home/manish/Documents/zencss/node_modules/dts-cli/dist/createBuildConfigs.js:19:40)
    at /home/manish/Documents/zencss/node_modules/dts-cli/dist/index.js:346:76

Node.js v18.17.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command```
aladdin-add commented 1 year ago

can you share how did you get the error?

area73 commented 11 months ago

I'm getting the same error.

Just doing npm run build

and on my package I have :

"build":"dts build --rollupTypes"

I'm using latest version "dts-cli": "2.0.3" and Node 18.18.2

> dts build  --rollupTypes

******/node_modules/dts-cli/dist/errors/extractErrors.js:39
        throw new Error('Missing options. Ensure you pass --name flag to dts');
              ^

Error: Missing options. Ensure you pass --name flag to dts
    at extractErrors (******/node_modules/dts-cli/dist/errors/extractErrors.js:39:15)
    at createRollupConfig (******/node_modules/dts-cli/dist/createRollupConfig.js:27:77)
    at ******/node_modules/dts-cli/dist/createBuildConfigs.js:21:74
    at Array.map (<anonymous>)
    at createBuildConfigs (******/node_modules/dts-cli/dist/createBuildConfigs.js:19:40)
    at ******/node_modules/dts-cli/dist/index.js:346:76

Node.js v18.18.2