[wp-trac] [WordPress Trac] #52843: Remove explicit puppeteer dependency from package.json

WordPress Trac noreply at wordpress.org
Tue Mar 30 13:06:05 UTC 2021


#52843: Remove explicit puppeteer dependency from package.json
--------------------------------------+-----------------------
 Reporter:  isabel_brison             |       Owner:  desrosj
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:  5.8
Component:  Build/Test Tools          |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------
Changes (by desrosj):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I'm still seeing some errors locally when running `npm run test e2e`:


 {{{
 > node ./tests/e2e/run-tests.js

 Chromium is already in /Users/username/Sites/wordpress-
 develop/node_modules/@wordpress/scripts/node_modules/puppeteer/.local-
 chromium/mac-818858; skipping download.
 Error: Cannot find module 'puppeteer'
 Require stack:
 - /Users/username/Sites/wordpress-develop/node_modules/jest-environment-
 puppeteer/lib/readConfig.js
 - /Users/username/Sites/wordpress-develop/node_modules/jest-environment-
 puppeteer/lib/global.js
 - /Users/username/Sites/wordpress-develop/node_modules/jest-environment-
 puppeteer/setup.js
 - /Users/username/Sites/wordpress-
 develop/node_modules/@jest/transform/build/ScriptTransformer.js
 - /Users/username/Sites/wordpress-
 develop/node_modules/@jest/transform/build/index.js
 - /Users/username/Sites/wordpress-develop/node_modules/jest-
 runtime/build/index.js
 - /Users/username/Sites/wordpress-
 develop/node_modules/@jest/core/build/cli/index.js
 - /Users/username/Sites/wordpress-
 develop/node_modules/@jest/core/build/jest.js
 - /Users/username/Sites/wordpress-develop/node_modules/jest/node_modules
 /jest-cli/build/cli/index.js
 - /Users/username/Sites/wordpress-develop/node_modules/jest/node_modules
 /jest-cli/build/index.js
 - /Users/username/Sites/wordpress-develop/node_modules/jest/build/jest.js
 - /Users/username/Sites/wordpress-
 develop/node_modules/@wordpress/scripts/scripts/test-e2e.js
     at Function.Module._resolveFilename
 (internal/modules/cjs/loader.js:880:15)
     at Function.Module._load (internal/modules/cjs/loader.js:725:27)
     at Module.require (internal/modules/cjs/loader.js:952:19)
     at require (internal/modules/cjs/helpers.js:88:18)
     at getPuppeteer (/Users/username/Sites/wordpress-develop/node_modules
 /jest-environment-puppeteer/lib/readConfig.js:58:14)
     at setup (/Users/username/Sites/wordpress-develop/node_modules/jest-
 environment-puppeteer/lib/global.js:21:50)
     at async /Users/username/Sites/wordpress-
 develop/node_modules/@jest/core/build/runGlobalHook.js:82:11
     at async waitForPromiseWithCleanup (/Users/username/Sites/wordpress-
 develop/node_modules/@jest/transform/build/ScriptTransformer.js:207:5)
     at async /Users/username/Sites/wordpress-
 develop/node_modules/@jest/core/build/runGlobalHook.js:72:9
     at async pEachSeries (/Users/username/Sites/wordpress-
 develop/node_modules/p-each-series/index.js:8:23)
 child_process.js:655
     throw err;
     ^

 Error: Command failed: wp-scripts test-e2e --config
 tests/e2e/jest.config.js
     at checkExecSyncError (child_process.js:616:11)
     at execSync (child_process.js:652:15)
     at Object.<anonymous> (/Users/username/Sites/wordpress-
 develop/tests/e2e/run-tests.js:9:1)
     at Module._compile (internal/modules/cjs/loader.js:1063:30)
     at Object.Module._extensions..js
 (internal/modules/cjs/loader.js:1092:10)
     at Module.load (internal/modules/cjs/loader.js:928:32)
     at Function.Module._load (internal/modules/cjs/loader.js:769:14)
     at Function.executeUserEntryPoint [as runMain]
 (internal/modules/run_main.js:72:12)
     at internal/main/run_main_module.js:17:47 {
   status: 1,
   signal: null,
   output: [ null, null, null ],
   pid: 77038,
   stdout: null,
   stderr: null
 }
 }}}

 When I run `npm list puppeteer`, I get the following output:


 {{{
 WordPress at 5.8.0 /Users/username/Sites/wordpress-develop
 ├─┬ @wordpress/scripts at 13.0.3
 │ └── UNMET PEER DEPENDENCY puppeteer at npm:puppeteer-core at 5.5.0
 └─┬ grunt-contrib-qunit at 4.0.0
   └── puppeteer at 4.0.1

 npm ERR! peer dep missing: puppeteer@>= 1.5.0 < 3, required by jest-
 puppeteer at 4.4.0
 }}}

 I am on MacOS running Node 14.16.0/NPM 6.14.11. I removed my
 `node_modules` folder and ran `npm install` fresh and still get that
 issue.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52843#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list