FredKSchott / pika-pack-builders

๐Ÿ— A collection of official & community @pika/pack build plugins
MIT License
162 stars 31 forks source link

can not build multi files package #118

Open fishead opened 4 years ago

fishead commented 4 years ago

I got the error below in my personal project, then reproduced it in this repo. check my demo at https://github.com/fishead/builders/commit/ca9cfaaf6546bd4ea96bad6d59d2d5399becd3cb

I made some changes to the master branch of this repo, error occur after running

npm run build

the output is

> pika-pack build

Note: This CLI was recently deprecated. Update your build script to: pika build [flags]
@pika/pack v0.5.0
[1/5] Validating source...
[2/5] Preparing pipeline...
      โ‡๏ธ  pkg/
[3/5] Running @pika/plugin-ts-standard-pkg...
      ๐Ÿ“  pkg/dist-src/index.js [esnext]
      ๐Ÿ“  pkg/dist-types/index.d.ts [types]
      ยป Linting with standard-pkg...
[4/5] Running @pika/plugin-build-node...

lerna ERR! npm run build stderr:
Error: Could not resolve './add' from pkg/dist-src/index.js

Do I missing something or pika can not work with multi files package?

unordinarity commented 3 years ago

I had same issue, but for me it's caused by using module with '/index.ts' entrypoint. I made a repo with samples and some inferences

https://github.com/unordinarity/pika-plugin-ts-standard-pkg-bug-sample