Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

3.12 Global Node Packages No longer installing #744

Closed
aweingarten opened this issue Jun 17, 2016 · 5 comments
Closed

3.12 Global Node Packages No longer installing #744

aweingarten opened this issue Jun 17, 2016 · 5 comments
Labels

Comments

@aweingarten
Copy link

aweingarten commented Jun 17, 2016

After upgrading to the latest version of Drupal VM. The node global packages no longer seem to install properly. The provision doesn't throw errors but grunt is not part of the global path.

# Node.js configuration (if enabled above).
# Valid examples: "0.10", "0.12", "4.x", "5.x".
nodejs_version: "0.12"
nodejs_npm_global_packages:
  - name: grunt
  - name: grunt-cli
  - name: bower
nodejs_install_npm_user: "root"
npm_config_prefix: "~/.npm-global"
@oxyc
Copy link
Collaborator

oxyc commented Jun 17, 2016

The user should be set to vagrant and not root now (i think using root was a temporary fix that I suggested in another issue).

The value set in default.config.yml is evaluted to vagrant:

nodejs_install_npm_user: "{{ drupalvm_user }}"

@aweingarten
Copy link
Author

@oxyc I tried it both ways. No luck.

@oxyc
Copy link
Collaborator

oxyc commented Jun 17, 2016

I just tested it and can confirm it doesn't work. It seems the npm_config_prefix directory is created under the root users home catalog.

It should work if you set:

npm_config_prefix: "/home/{{ drupalvm_user }}/.npm-global"

I'll try it and post back as well.

@oxyc
Copy link
Collaborator

oxyc commented Jun 17, 2016

I can confirm it fixed the issue.

oxyc added a commit to oxyc/drupal-vm that referenced this issue Jun 17, 2016
geerlingguy added a commit that referenced this issue Jun 18, 2016
Issue #744: Fix npm_config_prefix directory created under root instead of vagrant
@geerlingguy
Copy link
Owner

Thanks @oxyc - this is fixed in master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants