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)
- internal spawnSync error? HOT 2
- v8's takeCoverage method cannot be used
- Impossible to link to own shared library from native node module HOT 5
- Multiple entry points HOT 7
- Not working with sharp again "Cannot include directory %1 into executable." HOT 7
- test script crashes with bad invocation of npx HOT 4
- Node 18.15 as Error HOT 3
- Unexpected character in app icon HOT 3
- Is it possible to use a specific node version (16.8) in Vercel?
- Reading the root of a drive on windows results extra 'snapshot' directory HOT 4
- Cannot find worker js file included as an asset on Windows HOT 3
- [email protected] "No available node version satisfies node16.14.2" HOT 4
- how to run linux compiled node.js script in linux? i dont know the commands HOT 3
- It seems that pkg is not compatible with Axios! HOT 9
- Better error message than "AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value"
- error -4096??? HOT 1
- Strange exe crash because of "usb" library
- `link-module-alias` for Nodejs Javascript project (not Typescript) HOT 2
- Files packaged with code containing pupeteer-core 20.4.0 or higher cannot be executed HOT 9
- Pkg node version binary is different than pkg fetch node version HOT 1
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.