Comments (14)
hey @DarkerMatter can you tell me how you're including the library in your project?
from vue-good-table.
yarn add vue-good-table
in main.js:
import VueGoodTable from 'vue-good-table'
Vue.use(VueGoodTable)
from vue-good-table.
I realised that I first installed the lib while the electron app was still running. So, to see if that made any difference (hot compile vs cold compile), I removed the lib and readded it with yarn add vue-good-table
.
Now I'm getting the following error:
Uncaught SyntaxError: Unexpected token import
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at eval (eval at <anonymous> (http://localhost:9080/renderer.js:1428:1), <anonymous>:1:18)
Weird!
from vue-good-table.
Okay, I fixed that last error by modifying my webpack configuration but the original problem still stands.
from vue-good-table.
I am unable to replicate this.
node_modules/vue-good-table/src/images/search_icon.png
already exists when you use yarn to install the package. So i'm not sure what your fix is accomplishing?
mkdir node_modules/vue-good-table/src/images
cp node_modules/vue-good-table/dist/static/img/search_icon.6cf060d.png node_modules/vue-good-table/src/images/search_icon.png
from vue-good-table.
The node_modules/vue-good-table/src/images
directory is missing after I run yarn add vue-good-table
:
$ ls -l node_modules/vue-good-table
ls: node_modules/vue-good-table: No such file or directory
$ yarn add vue-good-table
yarn add v0.27.5
warning package.json: No license field
warning [email protected]: No license field
[1/5] Resolving packages...
[2/5] Fetching packages...
[3/5] Linking dependencies...
[4/5] Building fresh packages...
[5/5] Cleaning modules...
success Saved lockfile.
success Saved 3 new dependencies.
├─ [email protected]
├─ [email protected]
└─ [email protected]
warning [email protected]: No license field
$ npm run lint:fix
> [email protected] lint:fix /Users/user/Projects/electron/myproject
> eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src test
Done in 28.31s.
$ ls -l node_modules/vue-good-table/src/
total 8
drwxr-xr-x 3 jquigley staff 96 18 Jul 07:25 components
-rw-r--r-- 1 jquigley staff 397 6 Jul 20:37 index.js
$
I'm new to node/npm/javascript so please forgive me if I'm missing something obvious.
Could the lint:fix
step be doing something?
from vue-good-table.
I disabled the lint:fix
step but the directory is still missing:
$ yarn remove vue-good-table
yarn remove v0.27.5
warning package.json: No license field
[1/2] Removing module vue-good-table...
[2/2] Regenerating lockfile and installing missing dependencies...
warning [email protected]: No license field
success Uninstalled packages.
Done in 23.31s.
$ ls -l node_modules/vue-good-table/src/
ls: node_modules/vue-good-table/src/: No such file or directory
$ yarn add vue-good-table
yarn add v0.27.5
warning package.json: No license field
warning [email protected]: No license field
[1/5] Resolving packages...
[2/5] Fetching packages...
[3/5] Linking dependencies...
[4/5] Building fresh packages...
[5/5] Cleaning modules...
success Saved lockfile.
success Saved 3 new dependencies.
├─ [email protected]
├─ [email protected]
└─ [email protected]
warning [email protected]: No license field
Done in 28.55s.
$ ls -l node_modules/vue-good-table/src/
total 8
drwxr-xr-x 3 jquigley staff 96 18 Jul 07:58 components
-rw-r--r-- 1 jquigley staff 397 6 Jul 20:37 index.js
$
from vue-good-table.
Okay, I removed and installed again using npm and the directory is there:
$ ls -l node_modules/vue-good-table/src/images/
ls: node_modules/vue-good-table/src/images/: No such file or directory
$ npm i --save vue-good-table
npm WARN gentlyRm not removing /Users/user/Projects/electron/myproject/node_modules/.bin/uglifyjs as it wasn't installed by /Users/user/Projects/electron/myproject/node_modules/uglify-js
npm WARN gentlyRm not removing /Users/user/Projects/electron/myproject/node_modules/.bin/semver as it wasn't installed by /Users/user/Projects/electron/myproject/node_modules/semver
npm WARN gentlyRm not removing /Users/user/Projects/electron/myproject/node_modules/.bin/nopt as it wasn't installed by /Users/user/Projects/electron/myproject/node_modules/nopt
npm WARN gentlyRm not removing /Users/user/Projects/electron/myproject/node_modules/.bin/mkdirp as it wasn't installed by /Users/user/Projects/electron/myproject/node_modules/mkdirp
npm WARN gentlyRm not removing /Users/user/Projects/electron/myproject/node_modules/.bin/browserslist as it wasn't installed by /Users/user/Projects/electron/myproject/node_modules/browserslist
npm WARN [email protected] requires a peer of webpack@^1.0||^2.1.0-beta||^2.2.0-rc but none was installed.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
+ [email protected]
added 3 packages, removed 1349 packages and updated 1 package in 74.259s
╭─────────────────────────────────────╮
│ │
│ Update available 5.1.0 → 5.3.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯
$ ls -l node_modules/vue-good-table/src/images/
total 32
-rw-r--r-- 1 jquigley staff 15447 9 Jun 13:16 search_icon.png
$
So, npm
works and yarn
doesn't :-(
from vue-good-table.
ah it could be this?
yarnpkg/yarn#3169
from vue-good-table.
It looks like it. I installed the latest yarn
nightly too and it's still happening. The weird thing is that you mentioned earlier that you installed without issue using yarn
. What version of yarn
are you using?
from vue-good-table.
I've got v0.27.5 and it works fine for me... leading me to believe that it has to do something with your local yarn...
did you try clearing the cache like they suggested in that thread?
from vue-good-table.
I blew away the whole yarn installation and cache and reinstalled it from Homebrew which gives me 0.27.5 too and it still didn't work.
After reading through the whole thread I saw .yarnclean
mentioned. I have that file and there was a line in there for images
which I commented out and it all works fine now. I have no idea where the file came from as it isn't in the electron-vue
repo.
When I get time, I'll start a new electron-vue
project and see if the build process generates the file.
So, @xaksis, I just want to finish by saying thanks very much for your help and this project.
from vue-good-table.
@DarkerMatter no problem! I'm glad you were able to resolve it!
from vue-good-table.
I'm having a similar issue at the moment. Everything installed and compiled correctly, but when the table renders, I get a 404 on /static/img/search_icon.6cf060d.png
, which is a directory that is served up by my webserver. Is there a better way to include this image file so that it does not conflict with webserver static paths?
from vue-good-table.
Related Issues (20)
- Cannot add class to thead tr tag HOT 1
- how do I add tfoot?
- originalIndex different on mobile (tested in Safari on iOS) HOT 1
- Execute a function once when the dropdown is changed
- How do I add a new row?
- Property "$createElement" was accessed during render but is not defined on instance.
- Highlight search queries
- filter doesn't work in some columns
- Action button not showing when selecting a record using checkbox
- (vue-good-table-NEXT): Unable to dynamically set hidden column value
- searchFn not trigger when clean search key HOT 2
- Is this project active any longer? HOT 3
- 2 Data in 1 Row SearchFilter
- Not fully supported for RTL language HOT 1
- Preserving Selected Rows After Filtering HOT 1
- How to scroll to a specific line on vue good table HOT 4
- Cannot run app with basic table HOT 2
- mode='remote' + dropdownAllowAll enabled and selected >> total changes we should keep currentPerPage to -1
- Editable Component Value Propagation Issue
- Won't render using ts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-good-table.