bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.78k stars 1.32k forks source link

does this compile? #197

Closed gregveres closed 4 years ago

gregveres commented 4 years ago

I just followed the instructions for downloading the template and trying to get it to compile. I get 7 errors due to the linting rules that are in place:

PS C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate> node .\_start.js
PS C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate> rm .\_start.js
PS C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate> yarn install
yarn install v1.22.4
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 1.87s.
PS C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate> yarn dev
yarn run v1.22.4
$ vue-cli-service serve
 INFO  Starting development server...
98% after emitting SizeLimitsPlugin

 ERROR  Failed to compile with 7 errors                                                                                                                                                                                                          7:56:53 PM
 error  in ./src/components/_globals.js

Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate\src\components\_globals.js
  5:17  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `_globals.js` to same directory as `vue` or consider making `vue` a package  import/no-relative-parent-imports

✖ 1 problem (1 error, 0 warnings)

 @ ./src/main.js 10:0-30
 @ multi (webpack)-dev-server/client?http://10.100.0.190:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 error  in ./src/main.js

Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate\src\main.js
  1:1   error  `vue` import should occur after import of `./app.vue`                                                                                                                                                                       import/order    
  1:17  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `main.js` to same directory as `vue` or consider making `vue` a package  import/no-relative-parent-imports

✖ 2 problems (2 errors, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ multi (webpack)-dev-server/client?http://10.100.0.190:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 error  in ./src/router/index.js

Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate\src\router\index.js
  1:17  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `index.js` to same directory as `vue` or consider making `vue` a package
                 import/no-relative-parent-imports
  2:23  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `index.js` to same directory as `vue-router` or consider making `vue-router` a package   
                 import/no-relative-parent-imports
  4:21  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `index.js` to same directory as `vue-meta` or consider making `vue-meta` a package       
                 import/no-relative-parent-imports
  6:23  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `index.js` to same directory as `nprogress/nprogress` or consider making `nprogress/nprogress` a package  import/no-relative-parent-imports
  7:1   error  `@state/store` import should occur before import of `vue`
                 import/order
  8:1   error  `./routes` import should occur before import of `vue`
                 import/order

✖ 6 problems (6 errors, 0 warnings)
  2 errors and 0 warnings potentially fixable with the `--fix` option.

 @ ./src/main.js 6:0-29 20:10-16
 @ multi (webpack)-dev-server/client?http://10.100.0.190:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 error  in ./src/router/views/_timeout.vue

Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate\src\router\views\_timeout.vue
  2:1   error  `axios` import should occur after import of `./_loading.vue`                                                                                                                                                                         import/order
  2:19  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `_timeout.vue` to same directory as `axios` or consider making `axios` a package  import/no-relative-parent-imports

✖ 2 problems (2 errors, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ ./src/router/routes.js 141:13-43
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://10.100.0.190:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 error  in ./src/state/helpers.js

Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate\src\state\helpers.js
  1:50  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `helpers.js` to same directory as `vuex` or consider making `vuex` a package  import/no-relative-parent-imports

✖ 1 problem (1 error, 0 warnings)

 @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/router/views/login.vue?vue&type=script&lang=js& 3:0-45 32:29-40
 @ ./src/router/views/login.vue?vue&type=script&lang=js&
 @ ./src/router/views/login.vue
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://10.100.0.190:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 error  in ./src/state/modules/index.js

Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate\src\state\modules\index.js
  5:23  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `index.js` to same directory as `lodash/camelCase` or consider making `lodash/camelCase` 
a package  import/no-relative-parent-imports

✖ 1 problem (1 error, 0 warnings)

 @ ./src/state/store.js 4:0-32 7:11-18
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://10.100.0.190:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 error  in ./src/state/store.js

Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate\src\state\store.js
  1:17  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `store.js` to same directory as `vue` or consider making `vue` a package    import/no-relative-parent-imports
  2:18  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `store.js` to same directory as `vuex` or consider making `vuex` a package  import/no-relative-parent-imports
  3:1   error  `@utils/dispatch-action-for-all-modules` import should occur before import of `vue`                                                                                                                                            import/order 
  5:1   error  `./modules` import should occur before import of `vue`                                                                                                                                                                         import/order 

✖ 4 problems (4 errors, 0 warnings)
  2 errors and 0 warnings potentially fixable with the `--fix` option.

 @ ./src/main.js 7:0-33 21:9-14
gregveres commented 4 years ago

Nevermind.

I was in the wrong directory when I ran yarn dev, I was just mindlessly following the instructions.

JesseDahl commented 3 years ago

@gregveres I'm getting similar issues, but I'm running yarn dev from project root (which it looks like you did as well). error in ./src/main.js

Module Error (from ./node_modules/eslint-loader/index.js):

C:\Users\gregv\OneDrive\Documents\GitHub\vue-enterprise-boilerplate\src\main.js 1:1 error vue import should occur after import of ./app.vue import/order
1:17 error Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move main.js to same directory as vue or consider making vue a package import/no-relative-parent-imports

What am I missing here? I had to take out the following options from .eslintrc.js to get it to compile 'import/no-relative-parent-imports': 'error', 'import/order': 'error',

zackfroo commented 3 years ago

Same error right off the bat

EDIT: 'yarn upgrade' fixed the problem