Custom template causes a bash error, but only when used locally #445
Description
I asked for help in the forum (https://forum.vuejs.org/t/my-custom-vue-cli-template-causes-a-vue-cli-bash-error-but-only-when-used-locally/9804) but nobody responded so I'm opening this issue.
I forked the vue-cli webpack template a few months ago:
https://github.com/JauntyTech/vue-webpack-template-plus
and I have kept it up-to-date with the official webpack template by merging in updates every month.
The template only adds a few options that, when enabled, add files to the repo like a dummy Vuex store and Element UI styles.
Recently, I tried running the test.sh
script, in which the first step is to create a test project from the template like this:
./node_modules/.bin/vue init . test
and vue-cli fails with this error:
vue-cli · Parse error on line 44:
...se exit [ 1, true ]
----------------------^
Expecting 'OPEN_INVERSE_CHAIN', 'INVERSE', 'OPEN_ENDBLOCK', got 'EOF'
What's weird is that this error occurs whenever I use my local clone of the template repo (2nd example below), but not when used from the GitHub repo (1st example below):
✘-1 ~/projects
05:35 $ vue init JauntyTech/vue-webpack-template-plus thing1
? Project name thing1
? Project description A Vue.js project
? Author Jan Van Bruggen <jancvanbruggen@gmail.com>
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Setup unit tests with Karma + Mocha? Yes
? Setup e2e tests with Nightwatch? Yes
? Use the Element library of UI components? Yes
? Enable Pug to pre-process Vue component templates? Yes
? Enable Sass to pre-process Vue component styles? Yes
? Use Vuex to manage application state? Yes
vue-cli · Generated "thing1".
To get started:
cd thing1
yarn
npm run dev
Documentation can be found at https://vuejs-templates.github.io/webpack
✔ ~/projects
05:35 $ vue init ./jaunty/vue-webpack-template-plus/ thing2
? Project name thing2
? Project description A Vue.js project
? Author Jan Van Bruggen <jancvanbruggen@gmail.com>
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Setup unit tests with Karma + Mocha? Yes
? Setup e2e tests with Nightwatch? Yes
? Use the Element library of UI components? Yes
? Enable Pug to pre-process Vue component templates? Yes
? Enable Sass to pre-process Vue component styles? Yes
? Use Vuex to manage application state? Yes
vue-cli · Parse error on line 44:
...se exit [ 1, true ]
----------------------^
Expecting 'OPEN_INVERSE_CHAIN', 'INVERSE', 'OPEN_ENDBLOCK', got 'EOF'
Any help is appreciated! :) Thanks.