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

/nuxt.config.js is not in cwd #9640

Open
dot357 opened this issue Aug 7, 2021 · 4 comments · May be fixed by #9701
Open

/nuxt.config.js is not in cwd #9640

dot357 opened this issue Aug 7, 2021 · 4 comments · May be fixed by #9701

Comments

@dot357
Copy link

dot357 commented Aug 7, 2021

Greetings,

While I am trying to generate the NUXT app I encountered an issue.

Steps to reproduce

cd into the folder.
npm run build
npm run generate

bug

Versions

-nuxt : 2.15.7
-node : v14.17.1
-npm : 7.20.1

What is Expected?

I expected to get the dist folder. But didn't happened.

What is actually happening?

Giving "/nuxt.config.js is not in cwd " error. When I try to run the same npm run generate command at Ubuntu or a Linux machine, it works flawlessly, but my Windows system gives an error mentioned above.

@manniL
Copy link
Member

manniL commented Aug 7, 2021

Pretty sure this is related to how windows treats paths vs. Unix (/ vs. \).

Related: #7792, #7796 as well as sindresorhus/globby#133 directly (where the error is being thrown)

One idea could be to normalize the path passed to globby here.

@harishsg99 harishsg99 linked a pull request Aug 22, 2021 that will close this issue
2 tasks
@404NoSkill
Copy link

404NoSkill commented Sep 3, 2021

The error popped out today again , with fresh project and a project made yesterday .
But works flawlessly on linux

@ZTF666
Copy link

ZTF666 commented Sep 4, 2021

The error popped out today again , with fresh project and a project made yesterday .
But works flawlessly on linux

just normalized the path here as it's been suggested in one of the replies in the following file
node_modules@nuxt\cli\dist\cli-generate.js as below :

  const files = await globby__default['default']('**/*.*', {
    ...globbyOptions,
    ignore,
    cwd: upath.normalize(rootDir),
    absolute: true
  });

@danielroe danielroe self-assigned this Sep 4, 2021
@dot357
Copy link
Author

dot357 commented Dec 7, 2021

When I want to generate the app I hop into a virtual Linux machine to get the dist and that's it.

@danielroe danielroe removed their assignment Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants