Giter Club home page Giter Club logo

pnpm-docker-root-bug's Introduction

PNPM with docker

pnpm/pnpm#5051

development environment

  1. use pnpm & workspace
  2. use --filter options
  3. Run command in top-level directory in docker

How to fix?

Add WORKDIR & Do not use it as root WORKDIR workspace

Command

docker build .

error message

 => ERROR [4/5] RUN pnpm install                                                                        5.8s
------
 > [4/5] RUN pnpm install:
#8 0.636 Scope: all 3 workspace projects
#8 0.956 Progress: resolved 1, reused 0, downloaded 0, added 0
#8 1.958 Progress: resolved 4, reused 0, downloaded 3, added 0
#8 2.959 Progress: resolved 43, reused 0, downloaded 40, added 0
#8 3.962 Progress: resolved 85, reused 0, downloaded 68, added 0
#8 4.705 Packages: +76
#8 4.705 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#8 4.775 Packages are hard linked from the content-addressable store to the virtual store.
#8 4.775   Content-addressable store is at: /root/.local/share/pnpm/store/v3
#8 4.775   Virtual store is at:             node_modules/.pnpm
#8 4.962 Progress: resolved 101, reused 0, downloaded 76, added 76, done
#8 4.972 . postinstall$ pnpm onflow build
#8 5.328 . postinstall: > @ onflow /
#8 5.329 . postinstall: > pnpm --filter "onflow" "build"
#8 5.680 . postinstall:  ERROR  Expected pattern to be a non-empty string
#8 5.680 . postinstall: pnpm: Expected pattern to be a non-empty string
#8 5.680 . postinstall:     at picomatch (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:46782:15)
#8 5.680 . postinstall:     at Object.micromatch.isMatch (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:46963:54)
#8 5.681 . postinstall:     at /usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:51921:66
#8 5.681 . postinstall:     at Array.filter (<anonymous>)
#8 5.681 . postinstall:     at matchPackagesByGlob (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:51921:33)
#8 5.682 . postinstall:     at _filterGraph (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:51840:27)
#8 5.682 . postinstall:     at filterGraph (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:51814:29)
#8 5.682 . postinstall:     at async filterPkgsBySelectorObjects (/usr/local/lib/node_modules/pnpm/dist/pnpm.cjs:51777:27)
#8 5.690 . postinstall:  ELIFECYCLE  Command failed with exit code 1.
#8 5.698 . postinstall: Failed
#8 5.700  ELIFECYCLE  Command failed with exit code 1.
------
executor failed running [/bin/sh -c pnpm install]: exit code: 1

error backtrace

Bottomup

  1. https://github.com/micromatch/picomatch/blob/56083efda08c68b5123ba29c55a9f22e0d830b51/lib/picomatch.js#L47-L50
    • catch glob === ''
  2. https://github.com/micromatch/micromatch/blob/master/index.js#L123
  3. https://github.com/pnpm/pnpm/blob/597047fc056dd25b83638a9ab3df0df1c555ee49/packages/filter-workspace-packages/src/index.ts#L295-L297

pnpm-docker-root-bug's People

Contributors

ever0de avatar

Stargazers

 avatar

Watchers

 avatar

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.