EvanAgee / vuejs-wordpress-theme-starter

A WordPress theme with the guts ripped out and replaced with Vue.
https://vuewp.com/
1.6k stars 282 forks source link

Bootstrap install error #77

Closed wavywtf closed 4 years ago

wavywtf commented 4 years ago

I am trying to include bootstrap-vue into the theme but I am receiving the following error when running 'npm run dev' ---

ERROR in ./node_modules/bootstrap/dist/css/bootstrap.css
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'charCodeAt' of undefined

This is my second server and 4th attempt at trying to use bootstrap with the theme.

My steps for creating a new server and trying to use the theme plus bootstrap --- `

  1. Create server on Digital Ocean using wordpress marketplace image setup.
  2. Set domain to server on DO
  3. Log in SSH and run setup script.
  4. Wait for propagation.
  5. Then do this - https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04
  6. Change http to https in dashboard.
  7. Copied vue theme over to directory using SFTP.
  8. Install NPM with --- apt install npm
  9. CD into theme directory and run npm install
  10. Then run - npm run watch or npm run dev
  11. then run -- sudo apt-get install -y nodejs
  12. cd into directory then npm install --save-dev cross-env
  13. then - npm audit fix
  14. then - npm install --save-dev css-loader@3.2.0
  15. then - npm install --save-dev webpack-cli@3.3.9
  16. then delete package.loc
  17. then - run npm install babel-preset-stage-2 --save-dev
  18. then - run npm install --dev \ postcss-loader \ postcss-import \ postcss-cssnext \ cssnano \ sugarss \ autoprefixer --save-dev
  19. then run install vue-loader (look up command)
  20. comment out webconfig - minimize true
  21. then run npm install --save-dev css-loader sass-loader node-sass extract-loader file-loader copied previous webconfig file
  22. navigate to folder then run npm install bootstrap
  23. add import in app.js - import '../node_modules/bootstrap/dist/css/bootstrap.css' import '../node_modules/bootstrap-vue/dist/bootstrap-vue.css'
  24. before initating vue, add -- Vue.use(BootstrapVue)`

I'm also getting these warnings ---

npm WARN bootstrap@4.3.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.3.1 requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN css-loader@3.2.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.0 requires a peer of webpack@^4.36.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.0 requires a peer of sass@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.0 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-cli@3.3.9 requires a peer of webpack@4.x.x but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.4.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@3.1.14 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
EvanAgee commented 4 years ago

Hey @richj88 sorry you're having issues. From looking at your steps it looks like what's missing is installing bootstrap via npm and thus all of its dependencies aren't being installed either.

wavywtf commented 4 years ago

Hey @richj88 sorry you're having issues. From looking at your steps it looks like what's missing is installing bootstrap via npm and thus all of its dependencies aren't being installed either.

Hi thanks for the reply. I did install bootstrap via NPM but that didnt help. However I was able to get it resolved by opening a question on stackoverflow. LINK