Browse Source

Prevent symlink creation in npm install

Vagrant on Windows has issues with creating symlinks inside shared
folders - it requires a permission that isn't granted to a user by
default. This can be fixed by changing security policies, but for our
purposes we don't need the symlinks anyway, and can run the tools
manually like this, instead of using the .bin/ symlinks.
merge-requests/74/head
Deimos 5 years ago
parent
commit
ac4e8e9b54
  1. 9
      salt/salt/nodejs.sls
  2. 4
      tildes/package.json

9
salt/salt/nodejs.sls

@ -14,9 +14,12 @@ nodejs-pkgrepo:
- refresh: True
# Install the npm packages defined in package.json
# Uses the --no-bin-links option to prevent npm from creating symlinks in the .bin
# directory, which doesn't work inside Vagrant on Windows
install-npm-packages:
npm.bootstrap:
- name: {{ app_dir }}
- user: {{ app_username }}
cmd.run:
- name: npm install --no-bin-links
- cwd: {{ app_dir }}
- runas: {{ app_username }}
- require:
- pkg: nodejs

4
tildes/package.json

@ -5,8 +5,8 @@
"license": "AGPL-3.0-or-later",
"scripts": {
"lint": "npm run lint:js ; npm run lint:scss",
"lint:js": "eslint static/js/",
"lint:scss": "stylelint scss/"
"lint:js": "node node_modules/eslint/bin/eslint.js static/js/",
"lint:scss": "node node_modules/stylelint/bin/stylelint.js scss/"
},
"dependencies": {},
"devDependencies": {

Loading…
Cancel
Save