Comments (9)
This is still an issue. Getting unexpected token when including pouchdb-fauxton in my project.
Command ran is:
pkg app.js --targets node6.11.2-linux-x64
I have tried also with and without this in my package.json file:
"pkg": {
"scripts": "node_modules/pouchdb-fauxton/www/*.js",
"assets": "node_modules/pouchdb-fauxton/www/index.html"
}
Output is:
> Error! Unexpected token (14:0)
/Volumes/Data/Users/work/git/kiosk-platform/kiosk-site-api/node_modules/pouchdb-fauxton/www/index.html
Only temporary relief is to "minify" the HTML file using something like this: https://www.willpeavy.com/minifier/
from pkg.
Had the same issue with pouchdb-fauxton:
> Error! Unexpected token (14:0)
/Users/motin/Dev/Projects/sq/sq-project/tools/clerk-cli/node_modules/pouchdb-fauxton/www/index.html
However, since I am certain that I am not using pouchdb-fauxton (which is just an optional web frontend), a workaround is to remove the node_modules/pouchdb-fauxton
folder before running pkg.
from pkg.
Hi! I failed to reproduce. Seems that you add scripts
entry somewhere. Can you post full package.json? Or even better minimal example with all files to reproduce.
from pkg.
Same project as in the other issue: https://github.com/jbdemonte/Retro-Manager
from pkg.
Please upgrade to [email protected]
and try again
from pkg.
I get same error as @carrotalan when including pouchdb-fauxton, any update on this or is there any work around?
Thanks!
/Armin
from pkg.
I see this while trying to use the library vue-golden-layout
> [email protected]
> Error! Unexpected token (1:0)
/Users/tom/Github/vue-golden-layout/node_modules/golden-layout/src/css/goldenlayout-base.css
from pkg.
It seems that pkg
try to resolved non-javascript files (like .css
) as javascript files and caused this problem.
For me, this just happend if the entrypoint was package.json or the project path, when I use the .js
file as entrypoint, everything works well (but with no assets bundled). I have two speculations for that:
- maybe the
pkg
ignored all the non-javascript files when we use.js
file as entrypoint, but not ignored them when we usedpackage.json
. Third-packages has their own assets files, what we expected is just to copied those non-javascript files into bundled package. - maybe
pkg
always ignored those non-js files, but when we usepackage.json
or project path as entrypoint,pkg
just try to bundle all the dependencies defined in thepackage.json
, but when we used.js
file, it would try to resolved the correctly dependencies that really used in the entrypoint files, so the third-package with non-js files has never be resolved.
from pkg.
I see this while trying to use the library pm2
> [email protected]
> Error! Unexpected token (3:0)
/var/www/dotd/node_modules/pm2-deploy/deploy
from pkg.
Related Issues (20)
- Cannot build base binary for FreeBSD
- Latest arm64 macOS binary does not work when built on Ubuntu HOT 2
- there is something evil bug when we start a exe which is created by pkg
- Failed to compile Gluon applications correctly
- Issue #1962 should not be closed
- Not working with selenium-webdriver HOT 2
- Error! No available node version satisfies 'node20' HOT 4
- Deprecated subdependencies (babel, npmcli, ts-evaluator, and w3c-hr-time)
- fs.promises.access doesn't work in /snapshot HOT 2
- Error! Not more than one entry file/directory is expected HOT 1
- pkg can't use execFile correctly HOT 1
- notice pkg has a serious bug when we use child_process exec exec,execFile spawn HOT 1
- cpSync with recurse:true results in ENOENT
- at Pkg.usageError (/Users/usernameee/volta/tools/image/npm/10.2.4/lib/base-command.js:113:26)
- Failed to launch chrome browser from selenium webdriver in exe file HOT 1
- does it supprot termux
- SyntaxError: Invalid or unexpected token HOT 1
- Error: The specified module could not be found (External DLLs)
- [BUG] can't run child_process.fork with string code HOT 1
- Not able to create binaries for axios node package
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 pkg.