toastdotdev / toast

The best place to stack your JAM. Toast is a Jamstack framework
153 stars 13 forks source link

<Autogenerated> npm build failing for toast incremental . #73

Closed jenish-jain closed 2 years ago

jenish-jain commented 2 years ago

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
ChristopherBiscardi commented 2 years ago

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.

jenish-jain commented 2 years ago

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?

ChristopherBiscardi commented 2 years ago

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.