Bug: Following getting-started instructions results in 11ty error
heyMP opened this issue · comments
Details
I followed the instructions found on the getting-started
page found here https://wip-rocket.netlify.app/guides/first-pages/getting-started/
When I run npm start
I receive the following error:
npm run start
> rocket-test@1.0.0 start /Users/michael/Projects/rocket-test
> node --trace-warnings ./node_modules/.bin/rocket start
(node:69410) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object
at writeFile (fs.js:1436:5)
at go$writeFile (/Users/michael/Projects/rocket-test/node_modules/graceful-fs/graceful-fs.js:139:14)
at Object.writeFile (/Users/michael/Projects/rocket-test/node_modules/graceful-fs/graceful-fs.js:136:12)
at /Users/michael/Projects/rocket-test/node_modules/@11ty/eleventy/node_modules/fs-extra/lib/output/index.js:18:27
at /Users/michael/Projects/rocket-test/node_modules/universalify/index.js:23:46
at emitUnhandledRejectionWarning (internal/process/promises.js:168:15)
at processPromiseRejections (internal/process/promises.js:247:11)
at processTicksAndRejections (internal/process/task_queues.js:94:32)
Troubleshooting
It looks like 11ty is expecting a string by the time it gets to this function:
node_modules/@11ty/eleventy/node_modules/fs-extra/lib/output/index.js:18:27
However, it is getting an object. Here is an example of the data object going into fs.write() function:
err {
file: '_site-dev/index.html',
data: {
stories: [],
jsCode: '',
html: '<h1 id="welcome-to-your-rocket-site"><a aria-hidden="true" href="#welcome-to-your-rocket-site"><span class="icon icon-link"></span></a>Welcome to your Rocket site</h1>\n' +
'<p>Text here, like any markdown file.</p>'
},
encoding: 'utf8',
callback: [Function (anonymous)]
}
hey,
thank you for trying an alpha package
yeah the docs site got a little ahead of what was published
it should work fine now
PS: if you still find it not working please reopen or create a new issue
PPS: fair warning we will move this repo and publish via the official @rocket
namespace soonish