Skip to content
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

Wont build with yarn #1

Open
zdaar opened this issue Oct 27, 2022 · 5 comments
Open

Wont build with yarn #1

zdaar opened this issue Oct 27, 2022 · 5 comments

Comments

@zdaar
Copy link

zdaar commented Oct 27, 2022

Hi, I was following the steps on the blogpost when I ran into this issue in my codespace.
I ran it locally with the same error.
I decided to clone this repo template and I am still unable to build, so I must be missing something.
Steps :

yarn install
yarn build

Error is

PS C:\dev\repos\foundry-module-ts-template> yarn build  
yarn run v1.22.19
$ tsc && vite build
undefined
vite v3.2.0 building for production...
The "path" argument must be of type string. Received undefined
error during build:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:116:11)
    at Object.resolve (node:path:167:9)
    at resolve (file:///C:/dev/repos/foundry-module-ts-template/node_modules/vite/dist/node/chunks/dep-61d2428a.js:48161:35)
    at file:///C:/dev/repos/foundry-module-ts-template/node_modules/vite/dist/node/chunks/dep-61d2428a.js:48274:60
    at Array.map (<anonymous>)
    at doBuild (file:///C:/dev/repos/foundry-module-ts-template/node_modules/vite/dist/node/chunks/dep-61d2428a.js:48274:43)
    at async build (file:///C:/dev/repos/foundry-module-ts-template/node_modules/vite/dist/node/chunks/dep-61d2428a.js:48145:16)
    at async CAC.<anonymous> (file:///C:/dev/repos/foundry-module-ts-template/node_modules/vite/dist/node/cli.js:758:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What am I missing ?

@zdaar
Copy link
Author

zdaar commented Oct 27, 2022

The issue lies in vite.config.ts, output.dir is undefined.

@zdaar
Copy link
Author

zdaar commented Oct 27, 2022

There is a problem in the rollupOptions.
I was able to transpile by just using output.dir with output.entryFileNames

@NunoOliv
Copy link

@zdaar
Hi. I'm new to rollup and vite. Can you explain your solution or provide a snippet of the file? I'm having trouble getting it to work
Thanks

@zdaar
Copy link
Author

zdaar commented Nov 25, 2022 via email

@NunoOliv
Copy link

Ohh I got it. Separate the file from the directory on the configuration. Makes sense. Its working now.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants