Skip to content

bug: saving instructions to node_modules requires folder with package.json #94

@BerkeleyTrue

Description

@BerkeleyTrue

Ran into an issue after doing an npm install on a project. Not sure what change exactly caused this issue but it's an issue nonetheless (in two separate machines as well).

Was getting this error when bundling (browserify and watchify, with many different versions).

1__tmux

After some digging, changing this line
https://github.com/strongloop/loopback-boot/blob/master/lib/bundler.js#L97

to

var instructionsFile = path.resolve(__dirname, '..', 'instructions.json');

or

var instructionsFile = path.resolve(__dirname, '..', 'node_modules', 'instructions', 'instructions.json');

and adding the file node_modules/instructions/package.json with "main": "instructions" solved the issue.

Will submit PR shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions