toastdotdev/toast

<Autogenerated> npm build failing for toast incremental .

Closed this issue · 3 comments

Error

Error: 
   0: Failed to read `import-map.json` from `/project/public/web_modules/import-map.json`
   1: No such file or directory (os error 2)

Metadata

key value
version 0.1.0
os_type Darwin
os_release 19.6.0

Looks like you didn't run esinstall to prepare your dependencies.

Did you use the default starter site? (https://github.com/toastdotdev/starters)

The default starter would create this file on postinstall.

i am having an existing react and a preact project, I wanted to integrate a blog section using mdx so I didn't really use the default starter site here,
I was reading and adding dependencies on the go to just make it work 😅 , sorry for being too lame here
but should I be now configuring esinstall.js and postinstall.js similar to https://github.com/toastdotdev/starters/tree/main/default
and run the postinstall script?
or is their a easier way to make toast work with existing projects?

It would depend on what the existing project was and how it was set up.

The easiest solution is definitely to set up the esinstall like you see in the default starter so that it processes your third party dependencies appropriately and creates the import-map.

You can choose to run the esinstall script on postinstall or whenever you want.