Comments (4)
What method of setup did you follow?
from nodenv.
Here is the config I'm using:
.travis.yml
sudo: false
language: php
php:
- 5.6
env:
global:
- DOCROOT=$TRAVIS_BUILD_DIR/../drupal
- NIMBUS_DIR=$DOCROOT/...redacted
- NIMBUS_HALO_DIR=$DOCROOT/...redacted
cache:
bundler: true
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.composer/vendor"
- "$HOME/.drush/cache"
- "$HOME/.npm"
- "$HOME/.nodenv"
- "$NIMBUS_HALO_DIR/node_modules"
mysql:
database: ...redacted
username: ...redacted
encoding: utf8
# Set up environment.
before_install:
# Disable xdebug.
- phpenv config-rm xdebug.ini
# Set up composer.
- composer self-update
- export PATH="$HOME/.composer/vendor/bin:$PATH"
# Install drush
- composer global require drush/drush:8.* --prefer-source
- composer global require drupal/coder:8.* --prefer-source
- phpenv rehash
# Clear drush release history cache, to pick up new releases.
- rm -f ~/.drush/cache/download/*---updates.drupal.org-release-history-*
# Create MySQL Database
- mysql -e 'create database drupal;'
# Copy cached dependencies back to travis build dir so that they are
# not wiped out by `drush dl drupal` command.
- mv $NIMBUS_HALO_DIR/node_modules $TRAVIS_BUILD_DIR/
# Install Drupal and Nimbus itself.
install:
# Install drupal default profile
- cd ..
- drush dl drupal --drupal-project-rename=drupal -y
- cd drupal
# Copy nimbus into themes/contrib/nimbus.
- mkdir -p themes/contrib/nimbus
- cp -R ${TRAVIS_BUILD_DIR}/* themes/contrib/nimbus/
# Make custom dir for subtheme
- mkdir -p themes/custom
# Install Drupal and enable nimbus.
- drush --verbose site-install minimal --db-url=mysql://root:@127.0.0.1/drupal --yes
- drush en ...redacted
- drush ...redacted
# Set up front end dependencies.
- cd $NIMBUS_HALO_DIR
- ./install.sh
- export PATH="$HOME/.nodenv/bin:$PATH"
- eval "$(nodenv init -)"
- npm run install-tools
- npm rebuild node-sass
# Run nimbus tasks.
script:
# Codesniff all files, ignore third party libraries and compiled CSS.
- phpcs --standard=$HOME/.composer/vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml --ignore=*/STARTERKIT/gulp-tasks/*,*/STARTERKIT/gulpfile.js,*/STARTERKIT/theme-settings.php,*/node_modules/*,*/styleguide/*,*/css/* $NIMBUS_DIR
- phpcs --standard=$HOME/.composer/vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml --ignore=*/gulp-tasks/*,gulpfile.js,*/node_modules/*,*/styleguide/*,*/css/* $NIMBUS_HALO_DIR
- gulp
install.sh
#!/usr/bin/env bash
COLOR_NONE='\033[0m'
COLOR_RED='\033[0;31m'
COLOR_GREEN='\033[0;32m'
COLOR_PURPLE='\033[0;35m'
SHELLTYPE="$(basename "/$SHELL")"
SHELLRC=""
NODENV_EXPORT='export PATH="$HOME/.nodenv/bin:$PATH"'
NODENV_EVAL='eval "$(nodenv init -)"'
# Update PATH
function update_path {
echo -e "${COLOR_GREEN}Updating PATH${COLOR_NONE}"
if [ "$SHELLTYPE" = "bash" ]; then
if [ -f "$HOME/.bashrc" ]; then
SHELLRC="$HOME/.bashrc"
echo $NODENV_EXPORT >> $SHELLRC
echo $NODENV_EVAL >> $SHELLRC
echo "bashrc"
elif [ -f "$HOME/.bash_profile" ]; then
SHELLRC="$HOME/.bash_profile"
echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> $SHELLRC
echo 'eval "$(nodenv init -)"' >> $SHELLRC
echo "bp"
fi
elif [ "$SHELLTYPE" = "zsh" ]; then
if [ ! grep -q $NODENV_EXPORT ~/.zshrc ] && [ ! grep -q $NODENV_EVAL ~/.zshrc ] ; then
echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> $SHELLRC
echo 'eval "$(nodenv init -)"' >> $SHELLRC
echo "zsh"
fi
fi
}
# Install node-build
function install_nodebuild {
echo -e "${COLOR_GREEN}Installing node-build${COLOR_NONE}"
if [ ! -d "$HOME/.nodenv/plugins/node-build" ]; then
source $SHELLRC
git clone https://github.com/nodenv/node-build.git $(nodenv root)/plugins/node-build > /dev/null 2>&1
fi
}
# Install node local version
function install_node {
if [ -f ".node-version" ]; then
echo -e "${COLOR_GREEN}Installing node${COLOR_NONE}"
nodenv install > /dev/null 2>&1
else
echo "${COLOR_RED}No local node version found.${COLOR_NONE}"
fi
}
# Install nodenv
if [ ! -d "$HOME/.nodenv" ]; then
echo -e "${COLOR_GREEN}Installing nodenv${COLOR_NONE}"
git clone https://github.com/nodenv/nodenv.git ~/.nodenv > /dev/null 2>&1
update_path
install_nodebuild
install_node
echo -e "${COLOR_GREEN}Please restart your terminal or run the following command:${COLOR_NONE}"
echo -e "${COLOR_PURPLE}source $SHELLRC${COLOR_NONE}"
fi
from nodenv.
I'm not sure how to help with this. Is nodenv cloning correctly? Is it in the correct location? Does travis allow usage of binaries in $HOME
?
Can you verify that the clone is successful and the binary is where you expect it?
Can you verify that executing the binary via absolute path succeeds?
Can you verify that your $PATH
is correct?
Show what which nodenv -a
emits.
Though I'd take a step back and ask why you need to install nodenv on travis since they support node via nvm out of the box.
from nodenv.
closing as stale. feel free to re-open with further details if you still want guidance.
from nodenv.
Related Issues (20)
- Script to install/update nodenv on a shell (linux/mac) HOT 1
- How do things like yarn installs work within nodenv? HOT 3
- Support Corepack HOT 6
- Question: how to best run globally installed npm module? HOT 4
- Question: How would I go about removing nodenv and all node instances from a server? HOT 1
- Advice: nodejs latest release does not appear in $nodenv --list HOT 4
- Suggestion/Feature: LTS Version marker on the install list HOT 2
- strange undesired behavior when installing global dep HOT 1
- GPL License Compliance Issue HOT 2
- homebrew formula broken HOT 1
- Installing global package with yarn will not yield to a shim after rehash HOT 2
- `nodenv install` tries to use python and fails on MacOS Monterey 12.3 and later and fails HOT 6
- Support pnpm HOT 5
- In addition to .node-version, support .tool-versions and .nvmrc HOT 4
- Download fails with no error code
- No Debian / Ubuntu package available in the official repositories HOT 4
- Create Debian installation packages HOT 1
- Not respecting makefile HOT 2
- RBENV reference in the README HOT 2
- Documents HOT 1
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 nodenv.