Giter VIP home page Giter VIP logo

javascript-starter's People

Contributors

amitport avatar brunnerlivio avatar dependabot[bot] avatar kamilmysliwiec avatar lackeyi avatar renovate-bot avatar tony133 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

javascript-starter's Issues

npm install not adding all modules

Hi, wanted to try the framework and the project does not run since its missing modules after npm install. I only cloned the repo and run both npm install and npm run start.

Error stack:

babel-node index.js

internal/modules/cjs/loader.js:438
      throw e;
      ^

Error: Cannot find module 'C:\Users\Enzo\Desktop\hipercore-nest\node_modules\@babel\compat-data\data\corejs3-shipped-proposals'
    at createEsmNotFoundErr (internal/modules/cjs/loader.js:907:15)
    at finalizeEsmResolution (internal/modules/cjs/loader.js:900:15)
    at resolveExports (internal/modules/cjs/loader.js:432:14)
    at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\Enzo\Desktop\hipercore-nest\node_modules\@babel\preset-env\lib\polyfills\corejs3\usage-plugin.js:10:55)
    at Module._compile (internal/modules/cjs/loader.js:1063:30) {
  code: 'MODULE_NOT_FOUND',
  path: 'C:\\Users\\Enzo\\Desktop\\hipercore-nest\\node_modules\\@babel\\compat-data\\package.json'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `babel-node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

nodemon not working

I am trying to run npm run start:dev and getting below error.

image

I am trying on
Node Version: v10.7.0
NPM version: 6.1.0

Not working out of the box with @nestjs/mongoose

Steps to reproduces

Then I get this error:

Support for the experimental syntax 'classProperties' isn't currently enabled
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

How to fix it

  • npm install --save-dev @babel/plugin-proposal-class-properties
  • Add ["@babel/plugin-proposal-class-properties"] in the plugins array in .babelrc

Hope this can help :)

javascript?

I'm following the docs to try out nest and I've not jumped on the typescript bandwagon just yet, but I was under the impression that this repo would contain standard js code... Is this the right place to start for someone not using typescript? The files in src have .js extensions but the code is still typescript.

Not working

This version of code not working anymore. I have tried installing with npm install but it's not installing all the required packages. As a result it's not running using npm run start

TypeError: Class constructor MixinStrategy cannot be invoked without 'new'

Bug Report

I've started a new Node.js project and followed the passport authentication tutorial until:
https://docs.nestjs.com/techniques/authentication#jwt-functionality

Current behavior

Expected behavior

Applications should start.

Environment

My jsconfig.json file (I'v changed to esnext as suggested by nestjs/passport#27:

{
  "compilerOptions": {
      "target": "esnext",
      "experimentalDecorators": true
  },
  "exclude": [
      "node_modules"
  ]
}

Nest version: 6.7.2

 
For Tooling issues:
- Node version: v12.6.0  
- Platform:  Mac 

Others:

I've also edited local.strategy.js, i've switched the super(); and this.authService = authService; lines as I was getting an error:
TypeError: Cannot set property 'authService' of undefined

local.strategy.js

import { Strategy } from 'passport-local';
import { PassportStrategy } from '@nestjs/passport';
import { Injectable, UnauthorizedException, Dependencies } from '@nestjs/common';
import { AuthService } from './auth.service';

@Injectable()
@Dependencies(AuthService)
export class LocalStrategy extends PassportStrategy(Strategy) {
  constructor(authService) {
    super();
    this.authService = authService;
  }

  async validate(username, password) {
    const user = await this.authService.validateUser(username, password);
    if (!user) {
      throw new UnauthorizedException();
    }
    return user;
  }
}

"@ complie error

node: 8.10.0

when i run "npm run start:dev", the issue occure.
image
image

build / transpilation process

Hi there,

I cloned this repo and it looks like when I try to use nest-cli commands such as nest build or nest start I get this error

 Error  Could not find TypeScript configuration file "tsconfig.build.json". Please, ensure that you are running this command in the appropriate directory (inside Nest workspace).

This, I assume is because the default language when you nest start is TypeScript. Using npm start is fine, but I'm not too sure about using babel-node in a production environment since the babel-node docs explicitly say it's not meant for production.

Right now my work around is to transpile manually using babel-cli using something that looks like this npx babel src/ --out-dir dist/ and then I just node dist/main.js on the prod server.

My question is, am I missing something entirely about nest-cli usage? Or am I going about this in an acceptable way since the build should just be a transpilation anyways?

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.