Code Monkey home page Code Monkey logo

nodejs's Introduction

Nodejs extension for Chassis

Install Nodejs within your Chassis box! The PHPUnit extension automatically sets up your Chassis instance with the phpunit executable, for use running PHP unit tests.

Activation

Automated Installation

To add the phpunit extension to a Chassis box, include chassis/nodejs in the extensions list within your config.local.yaml file:

extensions:
    - chassis/nodejs

Then run vagrant provision to instruct Chassis to download and install the new extension.

Manual Installation

Ensure you have a Chassis instance set up locally already.

# In your Chassis dir:
cd extensions

# Grab the extension
git clone --recursive https://github.com/Chassis/nodejs.git nodejs

# Reprovision
cd ..
vagrant provision

Specifying a major version

To specify a version of Nodejs to install, add the major version to a Chassis config file:

nodejs:
  version: 16

nodejs's People

Contributors

bronsonquick avatar mitchazj avatar ntwb avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

nodejs's Issues

Provision this extension on a new box fails

A fresh Chassis install with just this extension doesn't install node as expected:

 default: Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install clang-3.4' returned 100: Reading package lists...
    default: Building dependency tree...
    default: Reading state information...
    default: Package clang-3.4 is not available, but is referred to by another package.
    default: This may mean that the package is missing, has been obsoleted, or
    default: is only available from another source
    default: However the following packages replace it:
    default:   clang
    default: 
    default: E: Package 'clang-3.4' has no installation candidate
    default: Error: /Stage[main]/Nodejs/Package[clang-3.4]/ensure: change from 'purged' to 'latest' failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install clang-3.4' returned 100: Reading package lists...
    default: Building dependency tree...
    default: Reading state information...
    default: Package clang-3.4 is not available, but is referred to by another package.
    default: This may mean that the package is missing, has been obsoleted, or
    default: is only available from another source
    default: However the following packages replace it:
    default:   clang
    default: 
    default: E: Package 'clang-3.4' has no installation candidate

Switch to Node 18.x

The current Node LTS version is 18.12.1 so we should probably bump our version from 16.x to 18.x

Change the URL for installing Node

As of the other day we are now getting this error:

==> default: Error: /usr/bin/curl -sL https://deb.nodesource.com/setup | sudo bash - returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Nodejs/Exec[node update]/returns: change from notrun to 0 failed: /usr/bin/curl -sL https://deb.nodesource.com/setup | sudo bash - returned 1 instead of one of [0]
==> default: Notice: /Package[nodejs]: Dependency Exec[node update] has failures: true
==> default: Warning: /Package[nodejs]: Skipping because of failed dependencies
==> default: Notice: Finished catalog run in 30.00 seconds
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

We need to change the URL to resolve this issue.

Compat issue with Chassis Xenial

==> default: Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install clang-3.4' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: Package clang-3.4 is not available, but is referred to by another package.
==> default: This may mean that the package is missing, has been obsoleted, or
==> default: is only available from another source
==> default: However the following packages replace it:
==> default:   clang-3.8:i386 clang:i386 clang-3.8 clang clang-3.7:i386 clang-3.6:i386
==> default:   clang-3.5:i386 clang-3.7 clang-3.6 clang-3.5
==> default: 
==> default: E: Package 'clang-3.4' has no installation candidate
==> default: Error: /Stage[main]/Nodejs/Package[clang-3.4]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install clang-3.4' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: Package clang-3.4 is not available, but is referred to by another package.
==> default: This may mean that the package is missing, has been obsoleted, or
==> default: is only available from another source
==> default: However the following packages replace it:
==> default:   clang-3.8:i386 clang:i386 clang-3.8 clang clang-3.7:i386 clang-3.6:i386
==> default:   clang-3.5:i386 clang-3.7 clang-3.6 clang-3.5
==> default: 
==> default: E: Package 'clang-3.4' has no installation candidate

Looks like clang-3.4 is no longer available for Ubuntu Xenial, using clang-3.8 seems to work

Specify version number

It might be nice to be able to specify a major version number in our yaml files rather than hard coding it to the latest version

Update this for Bionic Beaver support

We need to add support for Bionic Beaver. clang-3.8 isn't available for bionic so let's try bumping the version up to clang-6.0 and test it on both Xenial and Bionic.

Install yarn as well

I think it might be useful to provide yarn alongside this, some build scripts use that software to handle npm packages and additionally npm scripts may rely on it.

Yey? Nay?

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.