nestjs / nest-cli Goto Github PK
View Code? Open in Web Editor NEWCLI tool for Nest applications ๐น
Home Page: https://nestjs.com
License: Other
CLI tool for Nest applications ๐น
Home Page: https://nestjs.com
License: Other
Having a branch specifically for development is redundant since that is what master
is for. We'd need to coordinate an effort to merge develop
into master, and to set master as the default branch. All PRs against develop would have to be changed to compare against master, so this would be best when there are no open PRs.
AS a user I WANT TO have a coherent experience.
Hi
I tried using the cli in W10 with a new project
When I tried to add a controller to a module, in both cases the module content is erased and a ".ts.lock" file is created
This is the log of the console on a fresh project
C:\Users\USER\liquidaciones>nest generate module operaciones
create src\app\modules\operaciones\operaciones.module.ts
C:\Users\USER\liquidaciones>nest g controller operaciones operaciones
create src\app\modules\operaciones\controllers\operaciones\operaciones.controller.ts
create src\app\modules\operaciones\controllers\operaciones\operaciones.controller.spec.ts
events.js:160
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open 'C:\Users\USER\liquidaciones\src\app\modules\operaciones\operaciones.module.ts.lock'
at Error (native)
Previously I did nest new my-app
and then npm install
Thanks!
For the main Nest repo, it's important to make it easy for devs with issues to get their system info out. I'd be interested in there being a command to extract Nest, Node, and OS versions as suggested by @MonsieurMan.
'nest --version' command returns 1.0.0 even though version 1.7.0 is installed
CLI version: 1.7.0
Node version: 8.1.2
nest info
command display :
_ _ _ ____ _ ___
| \ | | ___ ___| |_ / ___| | |_ _|
| \| |/ _ \/ __| __| | | | | | |
| |\ | __/\__ \ |_ | |___| |___ | |
|_| \_|\___||___/\__| \____|_____|___|
[System Information]
OS Version macOS High Sierra
NodeJS Version v8.9.0
NPM Version 5.6.0
[Nest Information]
NestJS Version 4.5.10
Nest CLI Version 1.0.0
nest
command display :
nest 2.0.0-rc.2
USAGE
nest <command> [options]
COMMANDS
new <name> [destination] Create a new Nest application
info Display Nest CLI information.
serve Start a hot reload development server.
generate <type> <name> Generate a new Nest asset
help <command> Display help for a specific command
GLOBAL OPTIONS
-h, --help Display help
-V, --version Display version
--no-color Disable colors
--quiet Quiet mode - only displays warn and error messages
-v, --verbose Verbose mode - will also output debug messages
MORE INFO
Nest.js CLI
When running nest generate controller test
. Error occurs:
Error: Schematic "1" not found in collection "@nestjs/schematics".
at SchematicEngine.createSchematic (C:\Users\Erkebulan\AppData\Roaming\npm\node_modules\@nestjs\cli\node_modules\@angular-devkit\schematics\src\engine\engine.js:155:23)
at CollectionImpl.createSchematic (C:\Users\Erkebulan\AppData\Roaming\npm\node_modules\@nestjs\cli\node_modules\@angular-devkit\schematics\src\engine\collection.js:12:29)
at NodeWorkflow.execute (C:\Users\Erkebulan\AppData\Roaming\npm\node_modules\@nestjs\cli\node_modules\@angular-devkit\schematics\tools\workflow\node-workflow.js:54:38)
at Object.<anonymous> (C:\Users\Erkebulan\AppData\Roaming\npm\node_modules\@nestjs\cli\node_modules\@angular-devkit\schematics-cli\bin\schematics.js:172:10)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Function.Module.runMain (module.js:684:10)
Failed to execute command : @nestjs/schematics:1 --name=test --dry-run=false, see above.
nest.js 5.0.0 - Nest CLI
After run nest serve the error (s. subj)
I'm beginning working on the project, currently reading through the codebase.
I think we should write a CONTRIBUTE.md file first and choose a way to proceed.
@thomrick, I think you have more experience than me on this field, maybe you could lead the way ?
We also need a place to keep the roadmap, maybe as a clear section in the readme ?
I feel guilty when I see that the four opened issues are mine, I promise I'll PR to close them soon. ๐
By the way, congrats on the codebase, a pleasure to read it is.
would be great to add exceptions to the generator tool
Hey, I'm inside a freshly generated nest project (generated by the cli) and tried to run nest g module test
, which gives me this error:
ENOENT: no such file or directory, mkdir 'D:\D:\D:'
Windows 10 (newest updates)
64bit
i use 'nest new my-app', but the nestjs package version i 4.0.2 too old and has some problems, like @Moudle has no imports .etc
Hey @KerryRitter,
Why cloning a repository from github ?
It could be better to create the project from a local directory, isn't it ?
We can pass the language (ts or es) in params and it will copy the project from this directory with the right code and right configuration.
In other way, this local directory is better for demonstrations of the CLI tool without Internet connection ;-)
And finally It could be helpful for maintaining the CLI tool.
I've seen this article https://www.sitepoint.com/scaffolding-tool-caporal-js/ that explain how to.
What do think about it ?
Great work by the way
Problem:
I'm not able to run nest g module test
on my windows machine. Neighter in the powershell nor in gitbash.
Error:
ENOENT: no such file or directory, mkdir 'C:\C:\C:'
Version:
OS Version Windows 10
NodeJS Version v6.9.0 Boron
NPM Version 5.3.0
nestjs-cli 2.0.0-rc.3
THX for your time you spent on this repo and also nestjs!!
AS a user I WANT TO update nest dependencies WHEN new version is published
I think that we could simply ask the user if the project's using ts or es, create the config file and go on.
I didn't start my project with the nest CLI, but I want to use the CLI in my nest project.
Why do I get the following error?
nest serve [ WARN ] - Can't execute generate and serve commands until the project is not initialized
One thing I find to be really frustrating when developing with Nestjs is the fact that I have to restart the server everytime I make little changes to my code base.
After doing a little research I found out that is what nodemon is good for.
Development will be so much easier if this feature is available upon creation of a new project.
Please consider it.
Thanks for looking into it.
The readme says one should check the nestjs documentation regarding the usage, but I couldn't find anything related to nest-cli usage in there.
Am I missing something?
When generating a new component into a module that uses the ES6 "spread" operator (as mentioned in the official documentation when using "providers") an error is thrown and the files are not generated.
nest g component invoiceLine invoice
create src\app\modules\invoice\services\invoiceLine\invoiceLine.service.ts
create src\app\modules\invoice\services\invoiceLine\invoiceLine.service.spec.ts
undefined:6
..."invoiceProviders",
^
SyntaxError: Unexpected token . in JSON at position 70
at JSON.parse (<anonymous>)
at MetadataTransform._transform (C:\Users\...\scoop\persist\nodejs\bin\node_modules\@nestjs\cli\bin\core\assets\streams\metadata.transform.js:13:43)
at MetadataTransform.Transform._read (_stream_transform.js:186:10)
at MetadataTransform.Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at MetadataTransform.Writable.write (_stream_writable.js:290:11)
at ImportTransform.ondata (_stream_readable.js:640:20)
at emitOne (events.js:115:13)
at ImportTransform.emit (events.js:210:7)
at addChunk (_stream_readable.js:264:12)
at readableAddChunk (_stream_readable.js:247:13)
at ImportTransform.Readable.push (_stream_readable.js:209:10)
at ImportTransform.Transform.push (_stream_transform.js:147:32)
at ImportTransform._transform (C:\Users\...\scoop\persist\nodejs\bin\node_modules\@nestjs\cli\bin\core\assets\streams\import.transform.js:13:14)
at ImportTransform.Transform._read (_stream_transform.js:186:10)
@Module({
modules: [
DatabaseModule
],
components: [
...invoiceProviders,
InvoiceService,
],
exports: [
...invoiceProviders
]
})
export class InvoiceModule {
}
It would be great if we could define where the generator creates files base on the templates.
I got the following while trying to create a new project. However, it worked fine without the --dry-run flag.
Workspace $ nest new crypto-blogger-sample-api --dry-run
? description : crypto news
? version : 1.0.0
? author : Mayowa
CREATE /crypto-blogger-sample-api/.prettierrc (51 bytes)
CREATE /crypto-blogger-sample-api/README.md (355 bytes)
CREATE /crypto-blogger-sample-api/nodemon.json (147 bytes)
CREATE /crypto-blogger-sample-api/package.json (1367 bytes)
CREATE /crypto-blogger-sample-api/src/app.controller.spec.ts (564 bytes)
CREATE /crypto-blogger-sample-api/src/app.controller.ts (155 bytes)
CREATE /crypto-blogger-sample-api/src/app.module.ts (211 bytes)
CREATE /crypto-blogger-sample-api/src/main.ts (222 bytes)
CREATE /crypto-blogger-sample-api/test/app.e2e-spec.ts (593 bytes)
CREATE /crypto-blogger-sample-api/test/jest-e2e.json (169 bytes)
CREATE /crypto-blogger-sample-api/tsconfig.json (477 bytes)
CREATE /crypto-blogger-sample-api/tslint.json (895 bytes)
? Which package manager to use ? npm
Installing packages for tooling via npm
events.js:165
throw er; // Unhandled 'error' event
^
Error: spawn /bin/sh ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
at onErrorNT (internal/child_process.js:379:16)
at process._tickCallback (internal/process/next_tick.js:114:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)
at onErrorNT (internal/child_process.js:379:16)
at process._tickCallback (internal/process/next_tick.js:114:19)
Just started using this today, and think this is pretty awesome! Something approaching a dream come true from server side framework, for those of us working with Angular.
I see there's documentation indicating the CLI has a 'serve' option for hot reload, but when I try it it doesn't seem to exist. I just did global install with latest (shows 1.7.8 index.js)
Any suggestions for things to try?
After run nest serve on Windows (upgrade to 4.0.0-rc1) the simple help information (as after nest command) appears.
[ WARN ] - Can't execute generate and serve commands until the project is not initialized
I was unable to run those commands.
Any solution?
[ ] Regression
[ x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
On cli instalation of nest 5 i have an npm error.
Instalation
$ npm i -g @nestjs/cli
***.nvm/versions/node/v6.11.1/bin/nest -> ***.nvm/versions/node/v6.11.1/lib/node_modules/@nestjs/cli/bin/nest.js
***.nvm/versions/node/v6.11.1/lib
โโโ @nestjs/[email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/@nestjs/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
$ nest new proyect_api
...
? Which package manager to use ? npm
Installing packages for tooling via npm
Failed to execute command : install --silent, see above.
Package install failed, see above.
$ npm install
npm ERR! Linux 4.4.0-119-generic
npm ERR! argv ".nvm/versions/node/v6.11.1/bin/node" ".nvm/versions/node/v6.11.1/bin/npm" "install"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! file /var/www/html/proyect_api/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token ',' at 1:4
npm ERR! 123,10,32,32,34,110,97,109,101,34,58,32,34,103,105,115,45,114,101,115,116,45,97
npm ERR! ^
npm ERR! File: /var/www/html/proyect_api/package.json
npm ERR! Failed to parse package.json data.
$ cat package.json
123,10,32,32,34,110,97,109,101,34,58,32,34,103,105,115,45,114,101,115,116,45,97,112,105,34,44,10,32,32,34,118,101,114,115,105,111,110,34,58,32,34,49,46,48,46,48,34,44,10,32,32,34,100,101,115,99,114,105,112,116,105,111,110,34,58,32,34,103,105,115,45,112,114,111,121,101,99,116,34,44,10,32,32,34,97,117,116,104,111,114,34,58,32,34,34,44,10,32,32,34,108,105,99,101,110,115,101,34,58,32,34,77,73,84,34,44,10,32,32,34,115,99,114,105,112,116,115,34,58,32,123,10,32,32,32,32,34,102,111,114,109,97,116,34,58,32,34,112,114,101,116,116,105,101,114,32,45,45,119,114,105,116,101,32,92,34,42,42,47,42,46,116,115,92,34,34,44,10,32,32,32,32,34,115,116,97,114,116,34,58,32,34,116,115,45,110,111,100,101,32,45,114,32,116,115,99,111,110,102,105,103,45,112,97,116,104,115,47,114,101,103,105,115,116,101,114,32,115,114,99,47,109,97,105,110,46,116,115,34,44,10,32,32,32,32,34,115,116,97,114,116,58,100,101,118,34,58,32,34,110,111,100,101,109,111,110,34,44,10,32,32,32,32,34,112,114,101,115,116,97,114,116,58,112,114,111,100,34,58,32,34,114,109,32,45,114,102,32,100,105,115,116,32,38,38,32,116,115,99,34,44,10,32,32,32,32,34,115,116,97,114,116,58,112,114,111,100,34,58,32,34,110,111,100,101,32,100,105,115,116,47,109,97,105,110,46,106,115,34,44,10,32,32,32,32,34,115,116,97,114,116,58,104,109,114,34,58,32,34,110,111,100,101,32,100,105,115,116,47,115,101,114,118,101,114,34,44,10,32,32,32,32,34,116,101,115,116,34,58,32,34,106,101,115,116,34,44,10,32,32,32,32,34,116,101,115,116,58,99,111,118,34,58,32,34,106,101,115,116,32,45,45,99,111,118,101,114,97,103,101,34,44,10,32,32,32,32,34,116,101,115,116,58,101,50,101,34,58,32,34,106,101,115,116,32,45,45,99,111,110,102,105,103,32,46,47,116,101,115,116,47,106,101,115,116,45,101,50,101,46,106,115,111,110,34,44,10,32,32,32,32,34,119,101,98,112,97,99,107,34,58,32,34,119,101,98,112,97,99,107,32,45,45,99,111,110,102,105,103,32,119,101,98,112,97,99,107,46,99,111,110,102,105,103,46,106,115,34,10,32,32,125,44,10,32,32,34,100,101,112,101,110,100,101,110,99,105,101,115,34,58,32,123,10,32,32,32,32,34,64,110,101,115,116,106,115,47,99,111,109,109,111,110,34,58,32,34,94,53,46,48,46,48,45,98,101,116,97,46,49,34,44,10,32,32,32,32,34,64,110,101,115,116,106,115,47,99,111,114,101,34,58,32,34,94,53,46,48,46,48,45,98,101,116,97,46,49,34,44,10,32,32,32,32,34,64,110,101,115,116,106,115,47,109,105,99,114,111,115,101,114,118,105,99,101,115,34,58,32,34,94,53,46,48,46,48,45,98,101,116,97,46,49,34,44,10,32,32,32,32,34,64,110,101,115,116,106,115,47,116,101,115,116,105,110,103,34,58,32,34,94,53,46,48,46,48,45,98,101,116,97,46,49,34,44,10,32,32,32,32,34,64,110,101,115,116,106,115,47,119,101,98,115,111,99,107,101,116,115,34,58,32,34,94,53,46,48,46,48,45,98,101,116,97,46,49,34,44,10,32,32,32,32,34,102,97,115,116,105,102,121,45,102,111,114,109,98,111,100,121,34,58,32,34,94,50,46,48,46,48,34,44,10,32,32,32,32,34,114,101,102,108,101,99,116,45,109,101,116,97,100,97,116,97,34,58,32,34,94,48,46,49,46,49,50,34,44,10,32,32,32,32,34,114,120,106,115,34,58,32,34,94,53,46,53,46,54,34,44,10,32,32,32,32,34,116,121,112,101,115,99,114,105,112,116,34,58,32,34,94,50,46,54,46,50,34,10,32,32,125,44,10,32,32,34,100,101,118,68,101,112,101,110,100,101,110,99,105,101,115,34,58,32,123,10,32,32,32,32,34,64,116,121,112,101,115,47,101,120,112,114,101,115,115,34,58,32,34,94,52,46,48,46,51,57,34,44,10,32,32,32,32,34,64,116,121,112,101,115,47,106,101,115,116,34,58,32,34,94,50,49,46,49,46,56,34,44,10,32,32,32,32,34,64,116,121,112,101,115,47,110,111,100,101,34,58,32,34,94,57,46,51,46,48,34,44,10,32,32,32,32,34,64,116,121,112,101,115,47,115,117,112,101,114,116,101,115,116,34,58,32,34,94,50,46,48,46,52,34,44,10,32,32,32,32,34,106,101,115,116,34,58,32,34,94,50,49,46,50,46,49,34,44,10,32,32,32,32,34,110,111,100,101,109,111,110,34,58,32,34,94,49,46,49,52,46,49,34,44,10,32,32,32,32,34,112,114,101,116,116,105,101,114,34,58,32,34,94,49,46,49,49,46,49,34,44,10,32,32,32,32,34,115,117,112,101,114,116,101,115,116,34,58,32,34,94,51,46,48,46,48,34,44,10,32,32,32,32,34,116,115,45,106,101,115,116,34,58,32,34,94,50,49,46,50,46,52,34,44,10,32,32,32,32,34,116,115,45,108,111,97,100,101,114,34,58,32,34,94,52,46,49,46,48,34,44,10,32,32,32,32,34,116,115,45,110,111,100,101,34,58,32,34,94,52,46,49,46,48,34,44,10,32,32,32,32,34,116,115,99,111,110,102,105,103,45,112,97,116,104,115,34,58,32,34,94,51,46,49,46,49,34,44,10,32,32,32,32,34,116,115,108,105,110,116,34,58,32,34,53,46,51,46,50,34,44,10,32,32,32,32,34,119,101,98,112,97,99,107,34,58,32,34,94,52,46,50,46,48,34,44,10,32,32,32,32,34,119,101,98,112,97,99,107,45,99,108,105,34,58,32,34,94,50,46,48,46,49,51,34,44,10,32,32,32,32,34,119,101,98,112,97,99,107,45,110,111,100,101,45,101,120,116,101,114,110,97,108,115,34,58,32,34,94,49,46,54,46,48,34,10,32,32,125,44,10,32,32,34,106,101,115,116,34,58,32,123,10,32,32,32,32,34,109,111,100,117,108,101,70,105,108,101,69,120,116,101,110,115,105,111,110,115,34,58,32,91,10,32,32,32,32,32,32,34,106,115,34,44,10,32,32,32,32,32,32,34,106,115,111,110,34,44,10,32,32,32,32,32,32,34,116,115,34,10,32,32,32,32,93,44,10,32,32,32,32,34,114,111,111,116,68,105,114,34,58,32,34,115,114,99,34,44,10,32,32,32,32,34,116,101,115,116,82,101,103,101,120,34,58,32,34,46,115,112,101,99,46,116,115,36,34,44,10,32,32,32,32,34,116,114,97,110,115,102,111,114,109,34,58,32,123,10,32,32,32,32,32,32,34,94,46,43,92,92,46,40,116,124,106,41,115,36,34,58,32,34,116,115,45,106,101,115,116,34,10,32,32,32,32,125,44,10,32,32,32,32,34,99,111,118,101,114,97,103,101,68,105,114,101,99,116,111,114,121,34,58,32,34,46,46,47,99,111,118,101,114,97,103,101,34,10,32,32,125,10,125
Nest version: 5.0.1?
For Tooling issues:
- Node version: 6.11.1
- Platform: Linux
nest generate {command} {name}
send always error: Cannot read property 'find' of undefined
[System Information]
OS Version macOS High Sierra
NodeJS Version v6.9.5 Boron
NPM Version 5.6.0
[Nest Information]
NestJS Version 4.5.10
Nest CLI Version 1.0.0
AS a user I WANT TO use my own schematics collection WHEN I run nest new
AS a user I WANT TO use my own schematics collection WHEN I run nest generate
AS a user I WANT TO use my custom collection WHEN I generate a new element.
Hi,
I just found out about Nest.js today and am excited about it! Having a background in C/C++, Java Spring MVC and Node.js, it seems fantastic to have the bests of all areas.
Are you still working on the CLI? I see the latest commits are 2-4 months old and serve/build is not implemented. I think this project is about to explode in popularity especially if it has such a great scaffolding/generating mechanism like the angular-cli.
Are you planning to integrate GraphQL support to the CLI - and to the core of Nest.js?
Looking forward to further advancements, seems really promising at first glance! Can't wait to have some free hours to try.
It's will be helpful to add aliases for generating:
component : nest g c Cat
module : nest g m Cat
controller : nest g ct Cat
pipe: nest g p Cat
middleware : nest g md Cat
guard: nest g g Cat
- it's not implemented (will be good to add it)
gateway: nest g gt Cat
Users need documentation or access to it on the npm registry web site.
The readme should be updated as serve command has been implemented.
By the way I find it a little bit too large and hard to read, I was thinking about splitting it in multiple files, keeping really simple example on it but writting those really detailed ones in a different one. What do you think about it ?
I have blank new nest project generated with 'nest new app' command
When trying to generate new module with 'nest generate module newModule'
The: 'Invalid regular expression: //: \ at end of pattern' message appears
Whereas 'nest generate module new-module' works fine
CLI version: 1.7.0
Node version: 8.1.2
As much as I like the module architecture, it introduces one issue, everything is split apart. In my case I ended up maintaining a file containing all my application routes.
So I thought that it would be really simple and useful to create a command like:
nest list routes
GET /api/v1/sncf/train-stop-names
POST /api/v1/sncf/train-departures
GET /api/v1/sncf/vehicle-journey
We could also display:
It would be simple to implement (crawling the .controler.ts files) and I think would be a great way to have an overview of the project and it maybe could lead to listing other framework object or even a documentation generator in case of an API.
I'm open to discussing the idea and I'd like to do it if you see any interest in it.
pipe transform template need argument on class
from
...implements PipeTransform { ...
to
...implements PipeTransform<any> { ...
As a USER I want to have a funnier interface IN ORDER TO enjoy my experience
[System Information]
[Nest Information]
[Command]
nest generate module DataBase
[Error]
Unexpected token ] in JSON at position 61
Failed to execute command : @nestjs/schematics:module --name=data-base --dry-run=false, see above.
I have used this command right after nest new
. Project is clean.
AS a user I WANT TO use my own schematics collection WHEN I run nest new
what about use ts-node
instead npm run build && npm run start
on "serve" script?
It's more efficient and speedy.
Environment:
Command:
nest generate module admin
Error message:
create [WORKING_DIR]/src/modules/admin/admin.module.ts
Unexpected token . in JSON at position 36
Note: modules/admin/admin.modulet.ts
was created, but other files were not
Following the instruction on this page - https://www.npmjs.com/package/@nestjs/cli
nest new my-app --repository https://github.com/ThomRick/nest-typescript-starter
First I think npm install should be run alongside the creation of the app. Since that's what CLIs do.
Well after I run npm install
, another thing is that when you run nest s
, it doesn't work according to the instruction. But running nest serve
however, it says it can't find main.ts in the src folder. While in the typescript-starter app, it is server.ts, because the name of the starter file in the starter project is server.ts
Also when you run nest new my-app
and then run npm install and then run nest serve
it says it can't find server.ts, so had to change the name of the entryFile in nestconfig.json to main.ts
There are some inconsistencies in the naming of the file. And the set up of the nestconfig.json
AS a user I WANT TO use javascript as main language TO manage my Nest project
I began a new project using the nestjs/typescript-starter-project and I can't use the CLI.
I think the default base repo should be changed to the official one. And that the CLI should be updated to follow it's folder structure.
Is there any reason for it not being that way?
I've been trying to generate a new module with the nest-cli but I got Unexpected token . in JSON at position 57
Running it again with verbose enabled, I noticed that the error is happening when going through the app.module.ts, it seems like it's failing on reading module names for which the forRoot() function is called.
Here is the output of the verbose mode :
[DEBUG] - ModuleMetadataParser::extractMetadataText() - text : {
imports: [
CommonModule,
MongooseModule.forRoot(process.env.DB_URL
[DEBUG] - ModuleMetadataParser::format() - contentFormat : {
"imports": [
"CommonModule",
"MongooseModule"."forRoot"("process"."env"."DB"_"URL"Unexpected token . in JSON at position 57
When I remove the .forRoot(), the command works fine.
Step to reproduce:
sudo npm install -g @nestjs/cli
nest new myapp
[ WARN ] - Can't execute generate and serve commands until the project is not initialized
Note:
nest new myapp ./myapp
nest new myapp ~/projects/myapp
nest new myapp /home/users/me/myapp
All resulted in the same output as above
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.