tyrion / gridsome-plugin-netlify-cms-paths

Fix markdown image paths to work with Netlify CMS
10 stars 5 forks source link

TypeError: Cannot read property 'text/markdown' of undefined #2

Closed Edmund1645 closed 5 years ago

Edmund1645 commented 5 years ago

I just installed the plugin and configured it, when I try to run my development server I get an error:

TypeError: Cannot read property 'text/markdown' of undefined
    at new NetlifyPaths (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome-plugin-netlify-cms-paths/index.js:54:56)
    at config.plugins.map.entry (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/app/App.js:87:24)
    at Array.map (<anonymous>)
    at App.init (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/app/App.js:71:25)
    at App.bootstrap (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/app/App.js:49:23)
    at module.exports (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/app/index.js:11:13)
    at module.exports (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/develop.js:13:21)
    at args (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/index.js:41:12)
    at Command.program.command.description.option.option.action.args (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/index.js:8:44)
    at Command.listener (/home/edmund/.nvm/versions/node/v10.16.3/lib/node_modules/@gridsome/cli/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/home/edmund/.nvm/versions/node/v10.16.3/lib/node_modules/@gridsome/cli/node_modules/commander/index.js:651:12)
    at Command.parse (/home/edmund/.nvm/versions/node/v10.16.3/lib/node_modules/@gridsome/cli/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/home/edmund/.nvm/versions/node/v10.16.3/lib/node_modules/@gridsome/cli/bin/gridsome.js:70:9)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

I think it has to do with getting the MIME type.

tyrion commented 5 years ago

Hello thanks for posting this. What version of Gridsome are you using? Could you also post your gridsome.config.js. Or even better a stripped down version that still causes the error.

Edmund1645 commented 5 years ago

I just upgraded my Gridsome version, turns out it's not compatible with version 0.5.x, it works now. I upgraded to 0.7.x

tyrion commented 5 years ago

Great, I will close this then. Feel free to reopen if needed.