[Vuejs]-I have an error when building my nodejs app, the error is with vue-cli-service

0πŸ‘

βœ…

I exported the output in a file so I could see it in a whole and I saw other errors:

> root@1.0.0 build /home/dev/Dropbox/CS/projects/ozu
> lerna run build

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 3 packages: "npm run build"
lerna info run Ran npm script 'build' in '@ozu/common' in 2.0s:

> @ozu/common@0.0.1 build /home/dev/Dropbox/CS/projects/ozu/packages/common
> npm run compile


> @ozu/common@0.0.1 compile /home/dev/Dropbox/CS/projects/ozu/packages/common
> tsc -p tsconfig.build.json

lerna info run Ran npm script 'build' in '@ozu/api' in 9.5s:

> @ozu/api@1.0.1 build /home/dev/Dropbox/CS/projects/ozu/packages/api
> npm run compile && npm run build:doc


> @ozu/api@1.0.1 compile /home/dev/Dropbox/CS/projects/ozu/packages/api
> tsc -p tsconfig.build.json


> @ozu/api@1.0.1 build:doc /home/dev/Dropbox/CS/projects/ozu/packages/api
> apidoc -i src/ -o doc

{"level":"warn","message":"Please create an apidoc.json configuration file."}
{"level":"warn","message":"parser plugin 'apiparamexemple' not found in block: 0"}
{"level":"warn","message":"parser plugin 'apiparamexemple' not found in block: 11"}
{"level":"warn","message":"parser plugin 'apiparamexemple' not found in block: 2"}
{"level":"info","message":"Done."}
lerna ERR! npm run build exited 1 in '@ozu/ui'
lerna ERR! npm run build stdout:

> @ozu/ui@1.2.3 build /home/dev/Dropbox/CS/projects/ozu/packages/ui
> vue-cli-service build


Starting type checking service...
Using 1 worker with 2048MB memory limit
 ERROR  Failed to compile with 12 errors2:27:37 PM

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/partials/EditEventText/editEventText.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/partials/EditEventText/editEventText.ts
24:84 Property 'event' is used before its initialization.
    22 |   @Prop() event: EventModel
    23 |   private error: any = {}
  > 24 |   private newText: EventTextModel = {name: '', value: '', position: 1, event: this.event}
       |                                                                                    ^
    25 |   private createTextMode: boolean = false
    26 |   private currentText: EventTextModel
    27 | 

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/bulletins.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/bulletins.store.ts
120:43 Property 'message' does not exist on type 'unknown'.
    118 |       }
    119 |     } catch (e) {
  > 120 |       this.context.commit('_ApiError', (e.message))
        |                                           ^
    121 |       return null
    122 |     }
    123 | 

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts
42:43 Property 'message' does not exist on type 'unknown'.
    40 |       }
    41 |     } catch (e) {
  > 42 |       this.context.commit('_ApiError', (e.message))
       |                                           ^
    43 |       return null
    44 |     }
    45 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts
58:43 Property 'message' does not exist on type 'unknown'.
    56 |       }
    57 |     } catch (e) {
  > 58 |       this.context.commit('_ApiError', (e.message))
       |                                           ^
    59 |       return null
    60 |     }
    61 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts
74:43 Property 'message' does not exist on type 'unknown'.
    72 |       }
    73 |     } catch (e) {
  > 74 |       this.context.commit('_ApiError', (e.message))
       |                                           ^
    75 |       return null
    76 |     }
    77 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts
91:43 Property 'message' does not exist on type 'unknown'.
    89 |       }
    90 |     } catch (e) {
  > 91 |       this.context.commit('_ApiError', (e.message))
       |                                           ^
    92 |       return null
    93 |     }
    94 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts
108:43 Property 'message' does not exist on type 'unknown'.
    106 |       }
    107 |     } catch (e) {
  > 108 |       this.context.commit('_ApiError', (e.message))
        |                                           ^
    109 |       return null
    110 |     }
    111 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts
125:43 Property 'message' does not exist on type 'unknown'.
    123 |       }
    124 |     } catch (e) {
  > 125 |       this.context.commit('_ApiError', (e.message))
        |                                           ^
    126 |       return null
    127 |     }
    128 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts
142:43 Property 'message' does not exist on type 'unknown'.
    140 |       }
    141 |     } catch (e) {
  > 142 |       this.context.commit('_ApiError', (e.message))
        |                                           ^
    143 |       return null
    144 |     }
    145 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/bulletins/exports.store.ts
161:43 Property 'message' does not exist on type 'unknown'.
    159 |       }
    160 |     } catch (e) {
  > 161 |       this.context.commit('_ApiError', (e.message))
        |                                           ^
    162 |       return null
    163 |     }
    164 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/users.store.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/stores/users.store.ts
70:20 Property 'message' does not exist on type 'unknown'.
    68 |       return {
    69 |         success: false,
  > 70 |         message: e.message
       |                    ^
    71 |       } as ResponseObject
    72 |     }
    73 |   }

 error  in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/views/Bulletin/bulletin.ts

ERROR in /home/dev/Dropbox/CS/projects/ozu/packages/ui/src/views/Bulletin/bulletin.ts
9:23 Cannot find module 'http' or its corresponding type declarations.
     7 | import DeleteDialog from '../../partials/DeleteDialog'
     8 | import { liveApiUrl, liveTestApiUrl, newLiveApiUrl, newLiveTestApiUrl } from '../../conf'
  >  9 | import * as http from 'http'
       |                       ^
    10 | 
    11 | @WithRender
    12 | @Component({


lerna ERR! npm run build stderr:
-  Building for production...
DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($border-radius-root, 2) or calc($border-radius-root / 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

   β•·
14 β”‚     'sm': $border-radius-root / 2,
   β”‚           ^^^^^^^^^^^^^^^^^^^^^^^
   β•΅

I understood that there was an error with some packages, I updated typescript and vuetify and clean everything and rebuild and it worked.

0πŸ‘

Sometimes with Node, you have to use the heavy artillery! You have not given enough details for me to understand this issue so I’m just listing here the lazy-debugger-universal megatool:

> yarn (or npm) cache clean --force
> rm -rf ./node_modules
> rm -f yarn-lock.json (and/or package-lock.json and every other lock files)
> yarn (or npm) install

Let’s know whether the above commands solve anything. But I’d prefer you tell us what was the real issue though when you find it…

Leave a comment