Giter Club home page Giter Club logo

node-typescript-template's Introduction

Metrics

node-typescript-template's People

Contributors

chriswells0 avatar dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar joao-vitor-sr avatar slayug avatar urmaul 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

node-typescript-template's Issues

Fresh install "Error: No test files found"

Hi there, thanks for maintaining this template. I just noticed that mocha has trouble finding the test files:

Environment:

$ node --version
v18.9.0
$ npm --version
8.19.1
$ uname -a
Linux desktop 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy

Steps to reproduce:

git clone https://github.com/chriswells0/node-typescript-template.git test && \
cd test && \
rm -rf ./.git/ && \
git init && \
npm install && \
npm run build && \
npm run test

Output:


> [email protected] build
> npm run clean && npm run lint && tsc


> [email protected] clean
> (rm -r ./.nyc_output || true) && (rm -r ./coverage || true) && (rm -r ./dist || true)

rm: cannot remove './.nyc_output': No such file or directory
rm: cannot remove './coverage': No such file or directory

> [email protected] lint
> eslint --ext .ts --fix src/**/*.ts test/**/*.ts


> [email protected] test
> mocha

Error: No test files found

Thanks

Not working on windows

Tried to use this on a windows 10 machine but couldn't make it work, got different errors, like tests doesn't work, if I run the test script I get the following error:

"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" test --scripts-prepend-node-path=auto

> [email protected] test
> mocha

Error: No test files found

Process finished with exit code 1

If I try to run tests via WebStorm

C:\Users\Kennedy\WebstormProjects\xiv-chat-client\test\index.ts:3
import { expect } from 'chai';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1031:15)
    at Module._compile (node:internal/modules/cjs/loader:1065:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.exports.requireOrImport (C:\Users\Kennedy\WebstormProjects\xiv-chat-client\node_modules\mocha\lib\esm-utils.js:56:20)
    at async Object.exports.loadFilesAsync (C:\Users\Kennedy\WebstormProjects\xiv-chat-client\node_modules\mocha\lib\esm-utils.js:88:20)
    at async singleRun (C:\Users\Kennedy\WebstormProjects\xiv-chat-client\node_modules\mocha\lib\cli\run-helpers.js:125:3)
    at async Object.exports.handler (C:\Users\Kennedy\WebstormProjects\xiv-chat-client\node_modules\mocha\lib\cli\run.js:374:5)

Process finished with exit code 1

If I try to build it:

> [email protected] build
> npm run clean && npm run lint && tsc


> [email protected] clean
> (rm -r ./.nyc_output || true) && (rm -r ./coverage || true) && (rm -r ./dist || true)

'rm' is not recognized as an internal or external command,
operable program or batch file.
'true' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code 1
npm ERR! path C:\Users\Kennedy\WebstormProjects\xiv-chat-client
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c (rm -r ./.nyc_output || true) && (rm -r ./coverage || true) && (rm -r ./dist || true)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Kennedy\AppData\Local\npm-cache\_logs\2021-09-04T20_49_56_774Z-debug.log

NPM run scripts are not comaptible with Windows

Windows does not properly parse NPM run scripts that use semi-colons to separate commands. When one command is not required for success of the script, it should use || true instead of a semi-colon.

Add npm script to upgrade dependencies

It would be useful to have an npm script that upgrades all dependencies to their latest version (not updating to the highest version allowed by package.json).

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.