okami101 / vuetify-admin-preset

A Vue CLI preset using Vuetify Admin
https://www.okami101.io/vuetify-admin
MIT License
2 stars 1 forks source link

Error: Cannot find module 'ejs' #2

Open fullstackwebdev opened 2 years ago

fullstackwebdev commented 2 years ago

$ npx vue create frontend --preset okami101/vuetify-admin-preset

yarn serve
yarn run v1.22.17
$ vue-cli-service serve
 ERROR  Error: Cannot find module 'ejs'
        Require stack:
        - /home/[HOMEDIR]/tmp/frontend/node_modules/vue-cli-plugin-vuetify-admin/commands/make.js
        - /home/[HOMEDIR]/tmp/frontend/node_modules/vue-cli-plugin-vuetify-admin/index.js
        - /home/[HOMEDIR]/tmp/frontend/node_modules/@vue/cli-service/lib/Service.js
        - /home/[HOMEDIR]/tmp/frontend/node_modules/@vue/cli-service/bin/vue-cli-service.js
Error: Cannot find module 'ejs'
Require stack:
- /home/[HOMEDIR]/tmp/frontend/node_modules/vue-cli-plugin-vuetify-admin/commands/make.js
- /home/[HOMEDIR]/tmp/frontend/node_modules/vue-cli-plugin-vuetify-admin/index.js
- /home/[HOMEDIR]/tmp/frontend/node_modules/@vue/cli-service/lib/Service.js
- /home/[HOMEDIR]/tmp/frontend/node_modules/@vue/cli-service/bin/vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/home/[HOMEDIR]/tmp/frontend/node_modules/vue-cli-plugin-vuetify-admin/commands/make.js:4:13)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

fix ?

yarn add ejs

chawlajay commented 2 years ago

try this...

  1. yarn remove ejs (if you already executed 'yarn add ejs')
  2. npm i ejs --force --save
  3. check your package.json file, it must show dependency array or object having ejs in mentioned in it with version.