Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't deploy to Netlify. #1

Closed
sustained opened this issue Aug 22, 2019 · 2 comments
Closed

Can't deploy to Netlify. #1

sustained opened this issue Aug 22, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@sustained
Copy link
Owner

Running npm run generate works fine locally but not on Netlify.

9:31:24 AM: ERROR in ./.nuxt/dynamic-markdown-plugin.js
9:31:24 AM: Module not found: Error: Can't resolve 'nuxt-dynamic-markdown/dist/DynamicMarkdown.vue' in '/opt/build/repo/.nuxt'
9:31:24 AM:  @ ./.nuxt/dynamic-markdown-plugin.js 11:0-77 12:33-48
9:31:24 AM:  @ ./.nuxt/index.js
9:31:24 AM:  @ ./.nuxt/client.js
9:31:24 AM:  @ multi ./.nuxt/client.js
@sustained
Copy link
Owner Author

Even worse - netlify dev = works fine.

@sustained
Copy link
Owner Author

Well this issue is sure making me angry.

If we do this in the plugin (note the dot... it's a dot, not a tilde... that's important):

  Vue.component("Component", () => import("./components/DynamicMarkdown.vue"));

And we do this in the module:

  this.addTemplate({
    src: resolve(__dirname, '../components/DynamicMarkdown.vue'),
    fileName: 'components/DynamicMarkdown.vue'
  })

Then it works! Both dev server and generate! Hallelujah.

But it's weird because ~/components/DynamicMarkdown.vue won't work for that case.

And I don't understand why.

But progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant