GithubHelp home page GithubHelp logo

francoisvdv / lando-mutagen Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 2.0 332 KB

A Lando plugin for running mutagen in your Lando project.

License: MIT License

TypeScript 79.75% JavaScript 4.71% Shell 15.54%

lando-mutagen's People

Contributors

dependabot[bot] avatar francoisvdv avatar timvango avatar tylersatre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lando-mutagen's Issues

Error - Cannot convert undefined or null to object

Hello @francoisvdv,

I am testing out lando for a new project. Thanks for starting this project as I know how bad I/O performance can be on Macs & Windows. I've been using Mutagen w/ Docker for quite some time and it's working great.

I added your latest release v1.0.9 into my ~/.lando/plugins folder, added a .lando.mutagen.yml file into the new project but got the following error.

lando 10:29:38 ERROR ==> problem loading plugin lando-mutagen from /Users/aho/.lando/plugins/lando-mutagen/app.js: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Mutagen.availableInProject (/Users/aho/.lando/plugins/lando-mutagen/Mutagen.js:35:33)
    at module.exports (/Users/aho/.lando/plugins/lando-mutagen/app.js:29:18)
    at Plugins.load (/snapshot/cli/lib/plugins.js)
    at /snapshot/cli/lib/app.js
    at tryCatcher (/snapshot/cli/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/snapshot/cli/node_modules/bluebird/js/release/map.js:61:38)
    at MappingPromiseArray.<anonymous> (/snapshot/cli/node_modules/bluebird/js/release/promise_array.js:114:31)
    at MappingPromiseArray.init (/snapshot/cli/node_modules/bluebird/js/release/promise_array.js:78:10)
    at MappingPromiseArray._asyncInit (/snapshot/cli/node_modules/bluebird/js/release/map.js:30:10)
    at _drainQueueStep (/snapshot/cli/node_modules/bluebird/js/release/async.js:142:12)
    at _drainQueue (/snapshot/cli/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/snapshot/cli/node_modules/bluebird/js/release/async.js:147:5)
    at Immediate._onImmediate (/snapshot/cli/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate (internal/timers.js:464:21)

Would you happen to know what's wrong? Thanks.

Sync Not Started From Sub-directory

If lando start is run from a sub-directory the container starts up as expected, but the sync does not start. Example:

project
│   .lando.yml 
│
└───folder1
│   │   file011.txt
│   │   file012.txt
│   │
│   └───subfolder1
│       │   file111.txt
│       │   file112.txt

Running lando start in the project directory starts the sync. If it is run from project/folder1 or project/folder1/subfolder1 the container will start, but the sync will not. I know that the lando command will go up directories to find a .lando.yml file to use for configuration, it seems like this plugin isn't doing that.

Why even sync to host at all?

More so a question around this maybe you might know based on your experience so far, but reading through performance handling and everything it specifically says:

The downside of this approach is that all "excluded" directories are decoupled from your host

Is there any way to just completely NOT sync the node_modules to the host container at all that you are aware of? Reason being, all my development is done locally and I need the intellisense (reason i found your repo), but there's no reason for my node_modules to be on the container as they are just libraries that create the build files.

To make things even more interesting i'm using OSXFUSE to create multiple directories from the same source files, which means I have 20+ WordPress plugin plus the node_modules and anytime I do an npm install or install another package Docker seems to lock up or at least go nuts for a minute.

Figured I would see your opinion or if you know any workarounds. Going to give this library a try and see how that goes though with the excludes. Thanks!

TypeError: Cannot convert undefined or null to object

ERROR ==> problem loading plugin lando-mutagen from /Users/user/.lando/plugins/lando-mutagen/app.js: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Mutagen.availableInProject (/Users/user/.lando/plugins/lando-mutagen/Mutagen.js:29:33)
    at module.exports (/Users/user/.lando/plugins/lando-mutagen/app.js:29:18)
    at Plugins.load (/snapshot/cli/lib/plugins.js)
    at /snapshot/cli/lib/app.js
    at tryCatcher (/snapshot/cli/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/snapshot/cli/node_modules/bluebird/js/release/map.js:61:38)
    at MappingPromiseArray.<anonymous> (/snapshot/cli/node_modules/bluebird/js/release/promise_array.js:114:31)
    at MappingPromiseArray.init (/snapshot/cli/node_modules/bluebird/js/release/promise_array.js:78:10)
    at MappingPromiseArray._asyncInit (/snapshot/cli/node_modules/bluebird/js/release/map.js:30:10)
    at _drainQueueStep (/snapshot/cli/node_modules/bluebird/js/release/async.js:142:12)
    at _drainQueue (/snapshot/cli/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/snapshot/cli/node_modules/bluebird/js/release/async.js:147:5)
    at Immediate._onImmediate (/snapshot/cli/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate (internal/timers.js:464:21) 
[ { service: 'cli',

I had been getting this error on my machine. Not too familiar with typescript, with I set a condition within the object to make sure keys isn't null in the converted js:

const services = () => projectConfig ? Object.keys(projectConfig.services) : 0;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.