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

Template project with Utils project #27

Open
rameshnss opened this issue Sep 9, 2024 · 5 comments
Open

Template project with Utils project #27

rameshnss opened this issue Sep 9, 2024 · 5 comments

Comments

@rameshnss
Copy link

Hello Vasu31dev, your way of architecture of playwright project is excellent and I’d like to exercise for my learning. I skipped using cli and directly cloned your template project and installing your utils project. When I run tests from template using ‘npm run test’ , I’m getting playwright not recognized error. Pls advise. What I’m missing.

@vcannam
Copy link

vcannam commented Sep 19, 2024

Hi @rameshnss , Sorry for the late response. I have updated the packages just now. Can you please pull the latest code from the template project, run the npm run ready command and run the tests again. If you still face errors then can you please let me know the the OS, playwright version and the error message that you are getting.

@rameshnss
Copy link
Author

rameshnss commented Nov 4, 2024

Hi , I have your lib and template project. I did npm install in lib project. Then I did npm link in template project. I’m seeing “@playwright/test required second time
“ error. If I do npm install in template project then I can run tests without any issue. I’m using your package.json file. Not changing any version of playwright. I’m using windows OS. I’m seeing few issues online related to this issue but I could not get any solution yet.
please advise how can I use your lib project as dependency in my local dev environment

@vasu31dev
Copy link
Owner

Hi @rameshnss, You can just clone the template project and use npm install
This will automatically install all the dependencies needed for the library as well in the template project. No need to link or clone the library. This should help you with the clean setup.

@rameshnss
Copy link
Author

Yeah right , for me I need to add one more library to lib so I need local changes to reflect in template project. So I need to link projects so I can keep linking for dev environment. I will use install for prod environment. Any idea why I’m getting the playwright/test required second time error?

@vasu31dev
Copy link
Owner

vasu31dev commented Nov 5, 2024

@rameshnss You can add the new library directly as a dependency in the package.json file. Instead of linking the libraries, include them as dependencies. If you're still encountering errors, please share the package.json file. Also, avoid adding a separate Playwright library, as it is already included in my library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants