express-vue / express-vue

Vue rendering engine for Express.js. Use .Vue files as templates using streams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to force using parent dependencies?

marverix opened this issue · comments

Description of Issue

I have created package that is using express-vue. There is installed babel-loader, @babel/code and @babel/preset-env (as README says). But when I'm creating second package that is using the first one, then express-vue shouts that I'm missing dependencies. Is there any way to tell express-vue (or rather Webpack?) to search for all babel-stuff in package that is really using it (not the one that is using that package)?

Stack Trace / Console Log

Starting Webpack Compilation
--------
Compiled /home/username/dev/package-one/node_modules/vueify/test/fixtures/basic.vue
(node:9198) UnhandledPromiseRejectionWarning: [object Array]
(node:9198) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9198) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Compiled /home/username/dev/package-one/node_modules/vueify/test/fixtures/media-query.vue
(node:9198) UnhandledPromiseRejectionWarning: [object Array]
(node:9198) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Compiled /home/username/dev/package-one/node_modules/vueify/test/fixtures/postcss.vue
(node:9198) UnhandledPromiseRejectionWarning: [object Array]
(node:9198) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Compiled /home/username/dev/package-one/node_modules/vueify/test/fixtures/pre-processors.vue
(node:9198) UnhandledPromiseRejectionWarning: [object Array]
(node:9198) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
[ EntryModuleNotFoundError: Entry module not found: Error: Can't resolve 'babel-loader' in '/home/username/dev/package-two'
    at moduleFactory.create (/home/username/dev/package-one/node_modules/webpack/lib/Compilation.js:1043:31)
    at factory (/home/username/dev/package-one/node_modules/webpack/lib/NormalModuleFactory.js:401:22)
    at resolver (/home/username/dev/package-one/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
    at asyncLib.parallel (/home/username/dev/package-one/node_modules/webpack/lib/NormalModuleFactory.js:337:24)
    at /home/username/dev/package-one/node_modules/neo-async/async.js:2830:7
    at /home/username/dev/package-one/node_modules/neo-async/async.js:6877:13
    at /home/username/dev/package-one/node_modules/neo-async/async.js:2830:7
    at done (/home/username/dev/package-one/node_modules/neo-async/async.js:2925:13)
    at resolver.resolve (/home/username/dev/package-one/node_modules/webpack/lib/NormalModuleFactory.js:449:23)
    at doResolve (/home/username/dev/package-one/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
    at hook.callAsync (/home/username/dev/package-one/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/home/username/dev/package-one/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at resolver.doResolve (/home/username/dev/package-one/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
    at hook.callAsync (/home/username/dev/package-one/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/home/username/dev/package-one/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at hook.callAsync (/home/username/dev/package-one/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
resolve 'babel-loader' in '/home/username/dev/package-two'
  Parsed request is a module
  using description file: /home/username/dev/package-two/package.json (relative path: .)
    resolve as module
      /home/username/dev/node_modules doesn't exist or is not a directory
      /home/username/node_modules doesn't exist or is not a directory
      /home/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /home/username/dev/package-two/node_modules
        using description file: /home/username/dev/package-two/package.json (relative path: ./node_modules)
          using description file: /home/username/dev/package-two/package.json (relative path: ./node_modules/babel-loader)
            no extension
              /home/username/dev/package-two/node_modules/babel-loader doesn't exist
            .js
              /home/username/dev/package-two/node_modules/babel-loader.js doesn't exist
            .json
              /home/username/dev/package-two/node_modules/babel-loader.json doesn't exist
            as directory
              /home/username/dev/package-two/node_modules/babel-loader doesn't exist ]

Additional Comments

None