Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module ./errors #576

Closed
sonyarianto opened this issue Jan 23, 2020 · 5 comments · Fixed by #577 or #578
Closed

Cannot find module ./errors #576

sonyarianto opened this issue Jan 23, 2020 · 5 comments · Fixed by #577 or #578

Comments

@sonyarianto
Copy link

sonyarianto commented Jan 23, 2020

I try to install playwright.

npm i playwright

I got this.

sony@ubuntu:~/playground/playwright (master)$ npm install playwright

> playwright@0.9.19 install /home/sony/playground/playwright/node_modules/playwright
> node install.js

(node:8609) UnhandledPromiseRejectionWarning: Error: Cannot find module './errors'
Require stack:
- /home/sony/playground/playwright/node_modules/playwright-core/lib/helper.js
- /home/sony/playground/playwright/node_modules/playwright-core/index.js
- /home/sony/playground/playwright/node_modules/playwright-core/download-browser.js
- /home/sony/playground/playwright/node_modules/playwright/install.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/sony/playground/playwright/node_modules/playwright-core/lib/helper.js:19:18)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19)
(node:8609) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:8609) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN saveError ENOENT: no such file or directory, open '/home/sony/playground/playwright/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/sony/playground/playwright/package.json'
npm WARN playwright No description
npm WARN playwright No repository field.
npm WARN playwright No README data
npm WARN playwright No license field.

+ playwright@0.9.19
added 46 packages from 35 contributors and audited 53 packages in 3.346s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities
sony@ubuntu:~/playground/playwright (master)$ node -v
v12.13.1
sony@ubuntu:~/playground/playwright (master)$ npm -v
6.13.6

is it normal?

@JoelEinbinder
Copy link
Contributor

@dgozman it looks like we need to delete the lib folder before we publish. We are sending a very stale Errors.js which is overwriting errors.js in npm's case insensitive world, and then failing again in ubuntu's case sensitive world.

@JoelEinbinder
Copy link
Contributor

Should be fixed in v0.9.21

@sonyarianto
Copy link
Author

@JoelEinbinder @dgozman thank you guys :) wow

@MaxTester1
Copy link

MaxTester1 commented Feb 19, 2020

Issue, resolved, its a Proxy Issue.

Hi Team,

am also getting error while installing playwright
P:>npm i playwright

playwright@0.11.1 install P:\node_modules\playwright
node install.js

(node:18244) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
(node:18244) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:18244) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN saveError ENOENT: no such file or directory, open 'P:\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'P:\package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

  • playwright@0.11.1
    added 28 packages from 31 contributors and audited 1210 packages in 43.615s

4 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

any help would be great.

Thanks,

@dsisnero
Copy link

get same error

play>npx playwright install chromium
node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module './error.js'
Require stack:

  • f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\commander\lib\argument.js
  • f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\commander\index.js
  • f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\playwright-core\lib\cli\cli.js
  • f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\playwright-core\cli.js
  • f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules@playwright\test\cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\commander\lib\argument.js:1:34)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\commander\lib\argument.js',
    'f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\commander\index.js',
    'f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\playwright-core\lib\cli\cli.js',
    'f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\playwright-core\cli.js',
    'f:\programming\source\repos\git\dsisnero\faa_auth\play\node_modules\@playwright\test\cli.js'
    ]
    }

f:\programming\source\repos\git\dsisnero\faa_auth\play>

sand4rt pushed a commit to sand4rt/playwright that referenced this issue Dec 21, 2022
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants