GithubHelp home page GithubHelp logo

NPM install fails about ar3play-server HOT 7 CLOSED

alexcroox avatar alexcroox commented on July 17, 2024
NPM install fails

from ar3play-server.

Comments (7)

Dahlgren avatar Dahlgren commented on July 17, 2024

This is most probably related to #1. It should be possible to start the application with node main.js anyway, otherwise you can remove line 194 and 195 from lib/webserver.ts and run npm install again. These are the troublesome lines

    else
        return res.send(new restify.MethodNotAllowedError());

from ar3play-server.

Fusselwurm avatar Fusselwurm commented on July 17, 2024

@Dahlgren @alexcroox it seems the guys at DefinitelyTyped are taking their time with DefinitelyTyped/DefinitelyTyped#4015 , so fixed it on our side.

from ar3play-server.

alexcroox avatar alexcroox commented on July 17, 2024

Excuse my ignorance, I've made several node applications before but I've never used this .ts structure before. How do I start the application? node main.ts errors out and node main.js as per your instructions above fails because main.js doesn't exist. Is there a build step I'm missing?

from ar3play-server.

Fusselwurm avatar Fusselwurm commented on July 17, 2024

@alexcroox It's Typescript, a Javascript derivative that knows strict typing - basically Microsoft's stab at Ecmascript 6. I'm using it because typed callbacks are the best thing that has happened to my productivity in a long time ;)

Anyhow - Typescript compiles to Javascript.

The install script does that. Should do, that is. After npm inst , there should be a main.js that you can start.

There's two steps here that I put into that package.json#scripts/install line:

First ./node_modules/tsd/build/cli.js reinstall --save --override installs the "typings", these are basically header files / interface declarations for many of the used js libraries, so the Typescript compiler knows what to expect, and how to warn me if I use things wrongly.

Secondly, node_modules/typescript/bin/tsc --module commonjs ./*.ts */*.ts compiles all Typescript files into their Javascript equivalents.

Unfortunately, the error message tells us nothing about at which step the problem lies.

Could you try to do the following on a clean checkout:

  • remove the scripts/install line from package.json
  • run npm install
  • then, run ./node_modules/tsd/build/cli.js reinstall --save --override
  • if the former worked, run node_modules/typescript/bin/tsc --module commonjs ./*.ts */*.ts

and tell me where it dies, and what the error output is?

from ar3play-server.

alexcroox avatar alexcroox commented on July 17, 2024

I managed to get it installed with tsc main.ts just battling with getting Redis installed on Windows before I can continue (previously only ever installed on unix based systems).

from ar3play-server.

Dahlgren avatar Dahlgren commented on July 17, 2024

the npm install command is currently broken on Windows, see #3

from ar3play-server.

Fusselwurm avatar Fusselwurm commented on July 17, 2024

If there's anything wrong with/on Windows, I wont be able to help you - but I'll appreciate any fixes you can come up with ;)

Btw, Visual Studio should have the best Typescript support you can find :)

from ar3play-server.

Related Issues (7)

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.