Coder Social home page Coder Social logo

Comments (6)

jamiebuilds avatar jamiebuilds commented on May 22, 2024 2

We really need to solve this problem...

from lerna.

dtothefp avatar dtothefp commented on May 22, 2024 1

After going through the lerna bootstrap code and seeing that is just writes a mock child module to the parent module's package.json I realized I made a dumb mistake and was not compiling my packages/*/src modules to dist before running lerna bootstrap. Dumb mistake so I'm closing this issue

from lerna.

hzoo avatar hzoo commented on May 22, 2024 1

👍 Yeah I think everyone assumes it is npm linking haha

from lerna.

donmccurdy avatar donmccurdy commented on May 22, 2024

I'm struggling to get a Lerna repository set up with Travis CI as well. After trying various combinations, one subpackage or another always seems to not build. My project is https://github.com/donmccurdy/glTF-Transform, with the following running at the before_script step:

lerna bootstrap
lerna exec -- npm install
lerna link
npm run dist

Things fail in one of the first two steps. The dist script compiles all of the packages, and needs their dev and prod dependencies. Full logs are at https://travis-ci.com/donmccurdy/glTF-Transform/jobs/166066386, with the relevant excerpt below:

Output
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: npm install
lerna ERR! npm ERR! path /home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/ao-07510c7c/node_modules/@gltf-transform/core
lerna ERR! npm ERR! code ENOENT
lerna ERR! npm ERR! errno -2
lerna ERR! npm ERR! syscall rename
lerna ERR! npm ERR! enoent ENOENT: no such file or directory, rename '/home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/ao-07510c7c/node_modules/@gltf-transform/core' -> '/home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/core-d2cd2d50'
lerna ERR! npm ERR! enoent This is related to npm not being able to find a file.
lerna ERR! npm ERR! enoent 
lerna ERR! 
lerna ERR! npm ERR! A complete log of this run can be found in:
lerna ERR! npm ERR!     /home/travis/.npm/_logs/2018-12-19T04_14_28_446Z-debug.log
lerna ERR! 
lerna ERR!     at Promise.all.then.arr (/home/travis/build/donmccurdy/glTF-Transform/node_modules/lerna/node_modules/execa/index.js:236:11)
{ Error: Command failed: npm install
npm ERR! path /home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/ao-07510c7c/node_modules/@gltf-transform/core
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/ao-07510c7c/node_modules/@gltf-transform/core' -> '/home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/core-d2cd2d50'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-12-19T04_14_28_446Z-debug.log
    at Promise.all.then.arr (/home/travis/build/donmccurdy/glTF-Transform/node_modules/lerna/node_modules/execa/index.js:236:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 254,
  killed: false,
  stdout: '',
  stderr:
   'npm ERR! path /home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/ao-07510c7c/node_modules/@gltf-transform/core\nnpm ERR! code ENOENT\nnpm ERR! errno -2\nnpm ERR! syscall rename\nnpm ERR! enoent ENOENT: no such file or directory, rename \'/home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/ao-07510c7c/node_modules/@gltf-transform/core\' -> \'/home/travis/build/donmccurdy/glTF-Transform/node_modules/.staging/@gltf-transform/core-d2cd2d50\'\nnpm ERR! enoent This is related to npm not being able to find a file.\nnpm ERR! enoent \n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     /home/travis/.npm/_logs/2018-12-19T04_14_28_446Z-debug.log\n',
  failed: true,
  signal: null,
  cmd: 'npm install',
  timedOut: false,
  exitCode: 1 }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ lerna:bootstrap: `lerna bootstrap`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ lerna:bootstrap script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-12-19T04_14_28_480Z-debug.log
The command "npm run lerna:bootstrap && npm run lerna:install && npm run lerna:link && npm run dist" failed and exited with 1 during .

from lerna.

donmccurdy avatar donmccurdy commented on May 22, 2024

Go figure, I post here after a few hours of trying and then 10 minutes later get it working... 😅 In my case the issue was resolved by removing all of the package-lock.json files, and simplying before_script to just:

lerna bootstrap
npm run dist

I also added file:packages/foo devDependencies to the root package.json, but I'm not sure whether that was part of the fix.

from lerna.

lock avatar lock commented on May 22, 2024

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from lerna.

Related Issues (20)

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.