Error: Cannot find module '....\clients\node_modules@types\fs-extra'
Hi!, has anyone had a similar issue? It seems like playwright starting from 1.38 doesn't see the dependencies inside it's own folder (in my case ...\clients\test\playwright) and starts to look in root.
The command I've used for updating was: '''npm install -D @playwright/test@latest'''
All works fine after switching back to 1.37.1 '''npm install -D @playwright/[email protected]'''
Please help, I'm stuck here!
This thread is trying to answer question "Why are Node dependencies not found after updating Playwright from version 1.37 to 1.38?"
I went quickly through the changes, but couldnt find anything relevant.. https://github.com/microsoft/playwright/compare/release-1.37...release-1.38
@apis3445 thanks for replying, npm ls fs-extra shows: "PS C:\DATA\git\g3-basics-demo-application\clients\test\playwright> npm ls fs-extra [email protected] C:...\clients\test\playwright āāā [email protected]"
and running "npm install fs-extra" doesn't help either š¦
Maybe it's somehow related to https://github.com/microsoft/playwright/issues/26614 ? - it's the only issue I see related to node dependencies between 1.37 and 1.38
(I'm using node 18.2.0)
@mxschmitt thanks for your reply, tried it, but still no luck š¦ Please also mind that:
this is my "working" 1.37.1 package.json: `{ "name": "playwright", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "playwright": "npx playwright", "test": "npm run playwright test", "test:trace": "npm run test -- -- --trace=on & npm run test:report", "test:report": "npm run playwright show-report" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "@playwright/test": "^1.37.1", "axios": "^1.2.1", "csv": "^6.1.0", "csv-parse": "^5.3.3" }, "dependencies": { "fs-extra": "^11.1.1", "lodash": "^4.17.21" } }
and this is the not working one, 1.38:
{
"name": "playwright",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"playwright": "npx playwright",
"test": "npm run playwright test",
"test:trace": "npm run test -- -- --trace=on & npm run test:report",
"test:report": "npm run playwright show-report"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@playwright/test": "1.38",
"axios": "^1.2.1",
"csv": "^6.1.0",
"csv-parse": "^5.3.3"
},
"dependencies": {
"fs-extra": "^11.1.1",
"lodash": "^4.17.21"
}
}
`
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].