Comments (7)
Could you be more precise about the error you have please ?
This package is installed using production on many projects.
Required dependencies are listed in peer dependencies cause they are required at an higher level in your application.
Dev dependencies are just here to recreate a complete app environment during dev.
ex.
Commander is required by @nestjs/cli, commander is a peer dependency
rxjs is required by nestjs/core, same result
nestjs/common should be installed at root of you app, it's also a peer dependency.
Before to install in production mode you have to install peer deps (and framework deps too) Once peer dependencies are installed, you can install it using production.
This is not a standalone package, and it is supposed to work in a pre existing environement. That means any application that already have installed nestjs core, common and the commander packages.
from nestjs-console.
Maybe I should add the install workflow in the documentation but it's something that is very common in a lot of NPM packages.
During development of your app
- yarn add nestjs-console
- look for missing required peer dependencies.
- install missing peer dependencies.
Then during production deployment, you could install using a yarn install --production
from nestjs-console.
If I do yarn install --production
, I get following error trying run my console app:
/app # node dist/console.js
internal/modules/cjs/loader.js:797
throw err;
^
Error: Cannot find module 'lodash'
Require stack:
- /app/node_modules/nestjs-console/lib/scanner.js
- /app/node_modules/nestjs-console/lib/module.js
- /app/node_modules/nestjs-console/lib/bootstrap.js
- /app/node_modules/nestjs-console/lib/index.js
- /app/dist/console.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/app/node_modules/nestjs-console/lib/scanner.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:849:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/app/node_modules/nestjs-console/lib/scanner.js',
'/app/node_modules/nestjs-console/lib/module.js',
'/app/node_modules/nestjs-console/lib/bootstrap.js',
'/app/node_modules/nestjs-console/lib/index.js',
'/app/dist/console.js'
]
}
Is it helpful? do yo need my package.json or yarn.lock?
from nestjs-console.
Ok, lodash is missing in dependencies.
This was already fixed in the v2 branch that is going to be published on npm this week asap. (tests in progress)
We didn't see this issue in the past.
Thank you for the report.
from nestjs-console.
Ok, great!
from nestjs-console.
Any news about v2?
from nestjs-console.
Could you try the nestjs-console@next version from npm ?
from nestjs-console.
Related Issues (20)
- Examples doesn't work? HOT 2
- Documentation update for using opts HOT 5
- Support in nest v8 HOT 3
- _actionResults is undefined HOT 1
- Unable to add a global option HOT 2
- Unable to register commands in nestjs-console HOT 4
- CLI will _always_ throw an error even with empty promise handler HOT 3
- Can't read CLI options to configure the database HOT 3
- TypeError: parent.addCommand is not a function HOT 5
- Task Not Exiting HOT 2
- Support nestjs@9 HOT 2
- use enableShutdownHooks with nest-console
- ERROR [ExceptionHandler] undefined HOT 1
- Process.env issue HOT 3
- How to pass array of strings? HOT 1
- Example is slow? HOT 2
- Support for NestJs v10 HOT 2
- Module '"nestjs-console"' has no exported member 'createSpinner'. HOT 5
- What does this project do differently compared to nest-commander ? HOT 2
- Unknown createSpinner mention in wiki
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nestjs-console.