cloud-mta-build-tool: Cannot add node_modules on mac os

Unable to generate a mtar using MTB if the module contains a node_modules directory. If the directory is removed, the command works.

Please provide the following info:

Steps to Reproduce:

  1. Clone the project https://github.com/olirogers/mbt-test

  2. Run npm install to create node_modules directories. From the root dir: npm install cd srv && npm install

  3. Run mbt from the root dir: mbt build

Output is:

>> mbt build
[2019-11-02 19:35:32]  INFO generating the "Makefile_20191102193532.mta" file...
[2019-11-02 19:35:32]  INFO done
[2019-11-02 19:35:32]  INFO executing the "make -f Makefile_20191102193532.mta p=cf mtar= strict=true mode=" command...
[2019-11-02 19:35:32]  INFO validating the MTA project
[2019-11-02 19:35:32]  INFO validating the MTA project
[2019-11-02 19:35:32]  INFO building the "mbt-srv" module...
[2019-11-02 19:35:32]  INFO the build results of the "mbt-srv" module will be packed and saved in the "/Users/<user>/git/mbt-test/.mbt-test_mta_build_tmp/mbt-srv" folder
[2019-11-02 19:35:32] ERROR could not pack the "mbt-srv" module when archiving: stat ../mime/cli.js: no such file or directory
make: *** [mbt-srv] Error 1
Error: could not build the MTA project: could not execute the "make -f Makefile_20191102193532.mta p=cf mtar= strict=true mode=" command: exit status 2

This is the same result as using the npm builder.

If you delete the srv/node_modules folder, or exclude the folder, all is successful!

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Awesome! I see it now and this version works well, thanks a lot.