Skip to content

Custom theme dependencies when using nmp link #193

Closed
@andreasvirkus

Description

@andreasvirkus

When trying to develop the theme locally with npm link, by running this in my Vuepress project root:

npm link ../vuepress-theme-ajv

It complains about dependencies missing theme-side:

ERROR in ../vuepress-theme-ajv/Layout.vue
Module not found: Error: Can't resolve 'vue' in 'C:\Users\antc\code\vuepress-theme-ajv'
 @ ../vuepress-theme-ajv/Layout.vue 24:14-28
 @ ./node_modules/vuepress/lib/app/.temp/routes.js
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

ERROR in ../vuepress-theme-ajv/Layout.vue?vue&type=script&lang=js (./node_modules/vue-loader/lib??vue-loader-options!../vuepress-theme-ajv/Layout.vue?vue&type=script&lang=js)
Module not found: Error: Can't resolve 'nprogress' in 'C:\Users\antc\code\vuepress-theme-ajv'
 @ ./node_modules/vue-loader/lib??vue-loader-options!../vuepress-theme-ajv/Layout.vue?vue&type=script&lang=js 19:0-33 56:4-13 60:8-17 66:6-15
 @ ../vuepress-theme-ajv/Layout.vue?vue&type=script&lang=js
 @ ../vuepress-theme-ajv/Layout.vue
 @ ./node_modules/vuepress/lib/app/.temp/routes.js
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

But the theme works fine when installing it from the registry:
https://www.npmjs.com/package/vuepress-theme-ajv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions