Code Monkey home page Code Monkey logo

Comments (12)

hawkeye64 avatar hawkeye64 commented on July 2, 2024

npm install --dev vue-template-compiler should fix your issue.
I'll be taking a look at this on the weekend.

from electron-quasar-file-explorer.

dustingraham avatar dustingraham commented on July 2, 2024

Cool, as I mentioned, I got it working. I just wanted to provide this feedback because as a new user to quasar, I expected the demo to work without manually adding a package. Feel free to close if you don't want to make any changes.

from electron-quasar-file-explorer.

hawkeye64 avatar hawkeye64 commented on July 2, 2024

I pulled a new clone and built without issue. I believe the problem here was that you likely used npm to build and we have definitive proof that npm has issues with local packages and dependencies. It is recommended to install yarn, remove your node_modules folder, run yarn, then run yarn dev.

Would you be so helpful and try out these steps? Thanks.

from electron-quasar-file-explorer.

dustingraham avatar dustingraham commented on July 2, 2024

Confirm.

git clone https://github.com/hawkeye64/electron-quasar-file-explorer.git
cd electron-quasar-file-explorer
yarn
yarn dev

Works.

git clone https://github.com/hawkeye64/electron-quasar-file-explorer.git
cd electron-quasar-file-explorer
npm install
npm run dev

Fails with the vue-template-compiler error.

As mentioned, running npm install vue-template-compiler allows it to work.

$ git diff
diff --git a/package.json b/package.json
index 235dbff..36af0d1 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,8 @@
     "express": "^4.16.4",
     "mime-types": "^2.1.21",
     "moment": "^2.22.2",
-    "pretty-bytes": "^5.1.0"
+    "pretty-bytes": "^5.1.0",
+    "vue-template-compiler": "^2.6.10"
   },
   "devDependencies": {
     "babel-eslint": "^8.2.1",

Any drawback to adding that so that it works with NPM? Personally I prefer npm over yarn.

I've already learned a lot from what you provided, so thanks. I don't need this to work for myself. Just thought it'd be nice if any future users didn't stumble over this.

Thanks.

from electron-quasar-file-explorer.

hawkeye64 avatar hawkeye64 commented on July 2, 2024

I have run into so many issues with NPM. I have learned to use NPM for globals (because I use NVM) and Yarn for locals. Have seen a LOT of issues with NPM on Windows as well.

from electron-quasar-file-explorer.

hawkeye64 avatar hawkeye64 commented on July 2, 2024

So, did this:

  "peerDependencies": {
    "vue-template-compiler": "^2.6.10"
  }

and got this:

Module build failed (from ./node_modules/vue-loader/lib/index.js):
  Error: [vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options.
  
  - index.js:21 loadTemplateCompiler
    [electron-quasar-file-explorer]/[vue-loader]/lib/index.js:21:11
  
  - index.js:65 Object.module.exports
    [electron-quasar-file-explorer]/[vue-loader]/lib/index.js:65:35

Even tried putting it in devDependencies and same issue. This is with yarn.

with npm:

ERROR in ./src/pages/Error404.vue
Module build failed (from ./node_modules/vue-loader/lib/index.js):
  Error: [vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options.

Open for suggestions?

from electron-quasar-file-explorer.

hawkeye64 avatar hawkeye64 commented on July 2, 2024

btw, witthout adding it npm run dev works for me. As does yarn dev.

from electron-quasar-file-explorer.

dustingraham avatar dustingraham commented on July 2, 2024

In that case, you might have vue-template-compiler installed in your global npm repo.

I use node a lot. Generally linux, but sometimes on windows. I don't have many issues. I'll say that I have seen issues due to packages installed globally versus locally.

Anyways, I'll close this. All good.

from electron-quasar-file-explorer.

hawkeye64 avatar hawkeye64 commented on July 2, 2024

It's not global, Quasar has it in the chain, but NPM is having a hard time seeing it.

from electron-quasar-file-explorer.

dustingraham avatar dustingraham commented on July 2, 2024

I'm on linux, using npm version 6.9.0. A fresh clone of the repo fails to work for me on 3 different workstations. Adding vue-template-compiler to dependencies or devDependencies allows it to work for me.

I don't know why yours is working without it. You could try blowing away your node modules to see if you can reproduce the failure. You could also try on a different machine with a fresh checkout and running npm install followed by npm run dev.

from electron-quasar-file-explorer.

dustingraham avatar dustingraham commented on July 2, 2024

(regarding your comment, "btw, witthout adding it npm run dev works for me. As does yarn dev." it wasn't clear whether you deleted your node_modules prior to each test. It could be that running yarn pulls in the peer dependency automatically, then since it's already there, your npm run dev test is not a true test of how an npm user might approach this example since the library is already downloaded to node modules.)

from electron-quasar-file-explorer.

hawkeye64 avatar hawkeye64 commented on July 2, 2024

from electron-quasar-file-explorer.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.