magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.07k stars 683 forks source link

[bug]: Question on buildpack dependencies #2913

Closed fooman closed 3 years ago

fooman commented 3 years ago

Describe the bug This might only impact me as I am building weekly packages of PWA-Studio here. This week's build failed due to the changes coming from https://github.com/magento/pwa-studio/pull/2891. More specifically the introduction of the lodash package in create.js

  ⓧ  Error: Buildpack could not find a valid
     '_buildpack/create.js' file in
     /home/runner/work/pwa-studio-starter/pwa-studio/packages/venia-concept.
     This file must be present to instruct Buildpack
     how to use the
     /home/runner/work/pwa-studio-starter/pwa-studio/packages/venia-concept
     package to perform the "create" operation.
     Original error: Cannot find module 'lodash'
     Require stack:
     -
     /home/runner/work/pwa-studio-starter/pwa-studio/packages/venia-concept/_buildpack/create.js

I believe I am only seeing this but not you is that I only used pwa-buildpack to package. While create.js does reside in venia-concept (which has a dependency on lodash). I believe the dependencies of the to-be-packaged package should not require installing.

To reproduce Steps to reproduce the behavior:

  1. git clone
  2. cd packages/pwa-buildpack
  3. npm install
  4. DEBUG_PROJECT_CREATION=true ./packages/pwa-buildpack/bin/buildpack create-project ../tmp-to-delete --template "venia-concept" --name "pwa-studio-canary" --author "Test Authoruser@example.com" --backend-url "https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/" --braintree-token "sandbox_8yrzsvtm_s2bg8fs563crhqzk" --npm-client "yarn" --install 0

Expected behavior buildpack succeeds

Possible solutions Add lodash to pwa-buildpack update this seems to be the case already

Please complete the following device information:

Please let us know what packages this bug is in regards to:

m2-assistant[bot] commented 3 years ago

Hi @fooman. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


fooman commented 3 years ago

Solved the chicken/egg problem I had with yarn install on the repo level and that solved it.