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

lerna error while testing #829

Open
Samridhi-98 opened this issue Feb 14, 2022 · 5 comments
Open

lerna error while testing #829

Samridhi-98 opened this issue Feb 14, 2022 · 5 comments
Labels
comp: kaizen Development experience improvements, such as prettier, etc good first issue help wanted

Comments

@Samridhi-98
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior. MVCE would definitely help.

  • While running npm test from root in Windows 10 pro

Screenshot

image

@hugosenari
Copy link
Contributor

Can you please provide more information about your environment?
cygwin, git-bash, WSL or other?

@hugosenari hugosenari added the comp: kaizen Development experience improvements, such as prettier, etc label Feb 14, 2022
@Samridhi-98
Copy link
Author

Can you please provide more information about your environment? cygwin, git-bash, WSL or other?

git-bash and Powershell I tried running the above command in both and got the same error.

@hugosenari
Copy link
Contributor

Your previous image has some more information

image

You may be the only person with this setup that could properly reproduce and fix this bug.

I found this issue that could be related. But my bet would be with the escaping slash.

Please try this change in package.json

-    "test:packagelint": "lerna exec npmPkgJsonLint -- --quiet -c \$LERNA_ROOT_PATH/.npmpackagejsonlintrc.json .",
+    "test:packagelint": "lerna exec npmPkgJsonLint -- --quiet -c \"${LERNA_ROOT_PATH}\"/.npmpackagejsonlintrc.json .",

or this

-    "test:packagelint": "lerna exec npmPkgJsonLint -- --quiet -c \$LERNA_ROOT_PATH/.npmpackagejsonlintrc.json .",
+    "test:packagelint": "lerna exec npmPkgJsonLint -- --quiet -c '${LERNA_ROOT_PATH}/.npmpackagejsonlintrc.json' .",

and run:

npm run test:packagelint

@Samridhi-98
Copy link
Author

Samridhi-98 commented Feb 15, 2022

@hugosenari still getting the same error.
Couldn't find the path.
Is it node version issue? (mine is 14.17.4)

image

image

@ritik307
Copy link

ritik307 commented Feb 16, 2022

The problem is with window's file path which is different from that of Linux, which I guess you guys have already figured out.
So, now the solution would be (at least what I think is) to use WSL2 for running your project in windows.
The steps are simple

  1. Install WSL2 in your windows
  2. Install node inside your WSL2.
  3. Locate to the directory where your project is (probably inside the mnt directory) and then run the project with the cmd provided.

Following is the link on how to install WSL2 and node.
How to install WSL2
How setup node inside WSL2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: kaizen Development experience improvements, such as prettier, etc good first issue help wanted
Projects
None yet
Development

No branches or pull requests

3 participants