quasarframework / quasar-ui-qiconpicker

QIconPicker - Quasar App Extension
https://qiconpicker.netlify.app
MIT License
55 stars 18 forks source link

Error: Failed to compile with 2 errors #18

Closed apasov closed 4 years ago

apasov commented 4 years ago

This is what I get after upgrading from v1.0.3 to v1.0.5 or v1.0.6

image

If I downgrade to v1.0.3 my project compiles okay.

hawkeye64 commented 4 years ago

@apasov My apologies for that. Everything should be good again. Please let me know right away. Thanks.

hawkeye64 commented 4 years ago

You will need to upgrade to the latest @quasar/app v1.1.4 and the latest quasar-app-extension-qiconpicker v1.0.8

apasov commented 4 years ago

Still not working. Now in v1.0.8 there's 1 error instead of 2. I upgraded to quasar........ v1.1.7 and @quasar/app... v1.1.4

image

v1.0.3 works properly with quasar v1.1.7 and @quasar/app v1.1.4

hawkeye64 commented 4 years ago

@apasov Please do this:

  1. Delete node_modules and any lock file (ie: yarn.lock)
  2. run yarn --force
  3. Try building again
hawkeye64 commented 4 years ago

The demo is now live and having no issues: https://quasarframework.github.io/quasar-ui-qiconpicker/docs

hawkeye64 commented 4 years ago

see my discord announcement: https://discordapp.com/channels/415874313728688138/552811775440060417/630418914655993876

apasov commented 4 years ago

I did as you suggested (delete node_modules etc.) but still there is Error: Failed to compile with 1 error as in the above comment https://github.com/quasarframework/quasar-ui-qiconpicker/issues/18#issuecomment-538750003

By the way the demo says QIconPicker v1.0.3 https://quasarframework.github.io/quasar-ui-qiconpicker/docs

hawkeye64 commented 4 years ago

That is correct. @quasar/quasar-ui-qiconpicker = v1.0.3 and the @quasar/quasar-app-extension-qiconpicker = v1.0.8

@quasar/quasar-ui-qiconpicker is the actual component now. @quasar/quasar-app-extension-qiconpicker is the facilitator for Quasar CLI (so you don't have to write a boot file for it)

hawkeye64 commented 4 years ago

how about doing a quasar info and posting here so I can get an idea

hawkeye64 commented 4 years ago

I just created a brand new project, added

quasar ext add @quasar/qiconpicker

adjusted main page and then quasar dev and this is what I have image

hawkeye64 commented 4 years ago

If you would be so kind to unzip, yarn, then quasar dev and see if you get same results icon-picker-tester.zip

apasov commented 4 years ago

I tested the project you created - it works properly. Mine not. Here's quasar info output:

Operating System - Windows_NT(10.0.17763) - win32/x64
NodeJs - 12.11.1

Global packages
  NPM - 6.11.3
  yarn - 1.19.0
  @quasar/cli - 1.0.0
  cordova - 9.0.0 (cordova-lib@9.0.1)

Important local packages
  quasar - 1.1.7 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app - 1.1.4 -- Quasar Framework local CLI
  @quasar/extras - 1.3.2 -- Quasar Framework fonts, icons and animations
  vue - 2.6.10 -- Reactive, component-oriented view layer for modern web interfaces.
  vue-router - 3.1.3 -- Official router for Vue.js 2
  vuex - 3.1.1 -- state management for Vue.js
  electron - Not installed
  electron-packager - Not installed
  electron-builder - Not installed
  @babel/core - 7.6.2 -- Babel compiler core.
  webpack - 4.41.0 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  webpack-dev-server - 3.8.2 -- Serves a webpack app. Updates the browser on changes.
  workbox-webpack-plugin - 4.3.1 -- A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
  register-service-worker - 1.6.2 -- Script for registering service worker, with hooks

Quasar App Extensions
  @quasar/quasar-app-extension-qmarkdown - 1.0.0-beta.21 -- Display inline markdown in your Quasar App
  @quasar/quasar-app-extension-qiconpicker - 1.0.8 -- QIconPicker - A Quasar App Extension
  @quasar/quasar-app-extension-colorize - 1.0.0-alpha.1 -- Quasar color and theme mixins for Vue render functions
hawkeye64 commented 4 years ago

Are you using yarn? If not, I'd highly recommend that route on windows especially

hawkeye64 commented 4 years ago

also

quasar build -m pwa --debug

may give you more info about what's failing

hawkeye64 commented 4 years ago

and you can remove

@quasar/quasar-app-extension-colorize
quasar ext remove @quasar/colorize

it's deprecated and the whole point of redoing the app extensions was to make them not dependent on each other. It was used by QIconPicker

apasov commented 4 years ago

Yes, I'm using yarn. I removed @quasar/quasar-app-extension-colorize. Seems I found the error. Here's what's in quasar build -m pwa --debug output:

 @ ./src/router/routes.js 14:13-39
 @ ./src/router/index.js
 @ ./.quasar/app.js
 @ ./.quasar/client-entry.js
 @ multi ./.quasar/client-entry.js

ERROR in ./src/components/IconPicker.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--1-0!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib??vue-loader-options!./src/components/IconPicker.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve '@quasar/quasar-app-extension-qiconpicker/src/component/utils' in 'c:\projects\my-quasar-app\src\components'
 @ ./src/components/IconPicker.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--1-0!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib??vue-loader-options!./src/components/IconPicker.vue?vue&type=script&lang=js&) 136:6-100
 @ ./src/components/IconPicker.vue?vue&type=script&lang=js&
 @ ./src/components/IconPicker.vue
 @ ./node_modules/babel-loader/lib??ref--1-0!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/Editor.vue?vue&type=script&lang=js&
 @ ./src/pages/Editor.vue?vue&type=script&lang=js&
 @ ./src/pages/Editor.vue
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./.quasar/app.js
 @ ./.quasar/client-entry.js
 @ multi ./.quasar/client-entry.js

 app:build [FAIL] Build failed with errors. Check log above. +2ms

What do you think of it?

hawkeye64 commented 4 years ago

That is odd as that folder does not exist, however, it does exist here:

@quasar/quasar-ui-qiconpicker/src/component/utils

Let me investigate more

hawkeye64 commented 4 years ago

Got nothing. I tried

quasar build -m pwa --debug

on that project I gave you and it build (after commenting 'no-console' in eslintrc.js)

apasov commented 4 years ago

In my project that folder does not exist. Why this could be so?

image

hawkeye64 commented 4 years ago

I am thinking it has to do with some sort of caching. I mean, it used to be there, but it moved with the component into the other package.

apasov commented 4 years ago

Caching? By I deleted all cache. Delete node_modules and any lock file (ie: yarn.lock) run yarn --force

hawkeye64 commented 4 years ago

go to folder @quasar/quasar-ui-qiconpicker/src/component If you look at Component.js there is this:

// Util
import props from './utils/props'

That's where the error is comping from, just wrong package make the above code to this

// Util
import props from './utils/props.js'

and rebuild (added .js)

hawkeye64 commented 4 years ago

The other thing is you can delete your yarn cache, then delete node_modules, lock file, etc, then yarn then build I have deleted my yarn cache before and it can take a while

hawkeye64 commented 4 years ago

On Ubuntu, the yarn cache is in home-dir/.cache/.yarn yarn keeps anything you have ever installed, including previous versions great for offline installs and such and they may also do a bit of other magick with it mine had thousands of files in it and freed up 40GB

hawkeye64 commented 4 years ago

any status?

apasov commented 4 years ago

Well, cleaning yarn cache didn't help. Mine was not so big as yours, just 1.5GB

// Util import props from './utils/props.js'


and rebuild (added .js)

This didn't fix the error as well.

I also tried import props from '@quasar/quasar-ui-qiconpicker/src/component/utils/props' - but still got the same error: Module not found: Error: Can't resolve '@quasar/quasar-app-extension-qiconpicker/src/component/utils'.

The only thing that worked is that I copied the @quasar\quasar-ui-qiconpicker\src\component folder to @quasar\quasar-app-extension-qiconpicker\src\ Only after that my project built with v1.0.8

What are your thoughts?

hawkeye64 commented 4 years ago

No idea. That project I gave you worked, yet your existing one didn't. Kind of at a loss as to why.

hawkeye64 commented 4 years ago

You're not importing in utils from anywhere are you?

apasov commented 4 years ago

Oh, it was completely my fault. Yes, I was importing iconsets data directly from @quasar/quasar-app-extension-qiconpicker/src/component/utils/. Now they are in a different folder. So for my app upgrading from v1.0.3 to v1.0.8 was not a patch change but a major change) Thank you for your support and thanks again for this great extension!

hawkeye64 commented 4 years ago

Ah, that makes sense now. :) Glad it got worked out.