Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
duniter
duniter
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 192
    • Issues 192
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nodes
  • typescript
  • duniterduniter
  • Issues
  • #991

Closed
Open
Created May 24, 2017 by Cédric Moreau@c-geekOwner

Wrong loading with autoStack in a module

When we make a new module, depending on duniter and calling duniter.statics.autoStack(), the stack tries to find the modules in node_modules/duniter/package.json instead of local package.json.

This behavior could be fixed by adding a 2nd parameter to autoStack(), giving the directory where to look at:

autoStack: (priorityModules, dir) => { 
  const pjson = require(path.join(dir || __dirname, './package.json')); 
  // [...]
}

And on the call side:

const stack = require('duniter').statics.autoStack([{
  name: 'duniter-hello',
  required: require('./index')
}], __dirname)

Or with #989 (closed):

require('duniter').statics.quickRun(__dirname, './index.js')
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
1.3.0
Milestone
1.3.0
Assign milestone
Time tracking
None
Due date
None