So I cloned a starter package, migrated my content, everything looks good on local. Then I pushed it to a brand new Github repo, did the whole rename origin/add origin/push origin thing.
The repo now contains the original cloned package with none of my many edits. I'm guessing it just pulled the original repo over? If so, then I'm guessing it did this because of the contents of package.json. So I should probably try renaming that and recreating using npm init -y
Looks like I need to back up and start over. This is mostly a github thing, but I didn't see anything in the starter package (eleventy base blog) or eleventy documentation about needing to delete and redo the package.json when you clone a starter package. So this is either a potential 'common pitfall' or 'education' I guess...
You should consider asking the repo owner to turn it into a template repository, which will allow you to make a copy (different from cloning or forking) with an independent Git history.
If they won't do that, yes, you'll have to reinitialize the git repo. You should be able to remove ./git from the repo, then run git init again in it to initialize a new git repo, and then push up to your account.
will do - finally got git history cleared up and remerged/synced, now just facing Netlify build errors - can't seem to find details on this but currently using standard "_site" for build directory and "eleventy" as command - error is super-generic. :(
What's the error?
well now it's not so generic - using "npx @11ty/eleventy eleventy" for build command and netlify can't find the luxon module, which is required in the .eleventy.js file. Being used for date-time functions in this starter package evidently. How does one fix that ???
Executing user command: npx @11ty/eleventy eleventy
1:18:51 PM: Eleventy fatal error: (more in DEBUG output)
1:18:51 PM: > Error in your Eleventy config file '/opt/build/repo/.eleventy.js'. You may need to run `npm install`.
1:18:51 PM: `EleventyConfigError` was thrown
1:18:51 PM: > Cannot find module 'luxon'
1:18:51 PM: `Error` was thrown:
1:18:51 PM: Error: Cannot find module 'luxon'
This is now resolved. Not sure what the answer is for a 'proper' workflow, but two things do not work:
1 - leaving the original package.json in
2 - deleting the original and installing a bare package.json using npm init -y
What does work is to make sure any dependencies and dev dependencies get copied over to the new package.json. Seems like this should be clearer, but as @ogdenstudios mentioned, if it was set up as a template repository most of this would be a moot point.
When you start a new node project with a package.json, you should run npm install to get all the dependencies over. Most projects add node_modules/ to the .gitignore.
Here's a good docs page about npm-install which might kind of clear up that work flow.
I think the answer to this is the Template Repository @ogdenstudios mentioned
Perhaps luxon was not added as a dependency, so Netlify didn't know that it needs to download it.
npm install luxon --save should fix that.
Most helpful comment
Perhaps
luxonwas not added as a dependency, so Netlify didn't know that it needs to download it.npm install luxon --saveshould fix that.