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

Installation fails if you create new Nest app inside existing directory #222

Closed
spkellydev opened this issue Jan 21, 2019 · 3 comments
Closed

Comments

@spkellydev
Copy link

Small bug I found

I'm submitting a...


[ ] Regression 
[ x ] Bug report
[ x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

When creating a project inside an existing directory, I passed the . value for the directory name
nest new .
Which causes package.json to be generated with "name": ".", which creates a bug. Npm / yarn does not allow this name to be used and therefore the installation fails

Expected behavior

Use the name of the current working directory as the package.name to avoid this installation error.

Minimal reproduction of the problem with instructions

mkdir test && cd test
nest new .

What is the motivation / use case for changing the behavior?

I have an existing directory with some Docker / Traefik configurations and shell scripts. My goal was to just use the CLI to add a nest project in

Environment

[System Information]
OS Version     : Windows 10
NodeJS Version : v8.11.3
NPM Version    : 5.6.0
[Nest Information]
common version : 5.4.0
core version   : 5.4.0
@rjoydip-zz
Copy link
Contributor

rjoydip-zz commented Feb 17, 2019

I started working on this issue issues#222 but in @nestjs/schematics the application schema needs to change. I think there should be path option which can be used here application.factory.ts#L52

@undervane
Copy link

@spkellydev quite a few times I've encountered this issue, I'm really expecting this to be continued, what's the progress on this, @rjoydip?

@kamilmysliwiec
Copy link
Member

Just merged this PR nestjs/schematics#258 and published the new version of schematics

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

No branches or pull requests

4 participants