Commit ac4e8e9b authored by Deimos's avatar Deimos

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.
parent 54150538
...@@ -14,9 +14,12 @@ nodejs-pkgrepo: ...@@ -14,9 +14,12 @@ nodejs-pkgrepo:
- refresh: True - refresh: True
# Install the npm packages defined in package.json # 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: install-npm-packages:
npm.bootstrap: cmd.run:
- name: {{ app_dir }} - name: npm install --no-bin-links
- user: {{ app_username }} - cwd: {{ app_dir }}
- runas: {{ app_username }}
- require: - require:
- pkg: nodejs - pkg: nodejs
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"scripts": { "scripts": {
"lint": "npm run lint:js ; npm run lint:scss", "lint": "npm run lint:js ; npm run lint:scss",
"lint:js": "eslint static/js/", "lint:js": "node node_modules/eslint/bin/eslint.js static/js/",
"lint:scss": "stylelint scss/" "lint:scss": "node node_modules/stylelint/bin/stylelint.js scss/"
}, },
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment