I was using pdfjs-dist v2.5.207 with nuxt v2.4.5 and it was working perfectly fine. Now, that I am trying to upgrade my application to nuxt v2.15.8, the server build is failing because of pdfjs. I tried upgrading pdfjs-dist to v2.14.305 but it's not helping.
The build error log is not giving any useful information. It seems like a build compatibility issue, can someone please suggest a solution here?
I was using worker-loader v3.0.3, which I tried upgrading to v3.0.8, but that also didn't solve the problem.
********************************************************/ /******/ // The module cache
| /******/var __webpack_module_cache__={};/******/ /******/ // The require function
| /******/function __w_pdfjs_require__(moduleId){/******/ // Check if module is in cache
# ./node_modules/pdfjs-dist/webpack.js 14:28-53
# ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/components/PDFDocument.vue?vue&type=script&lang=js&
# ./resources/components/PDFDocument.vue?vue&type=script&lang=js&
# ./resources/components/PDFDocument.vue
# ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/components/preview-documents.vue?vue&type=script&lang=js&
# ./resources/components/preview-documents.vue?vue&type=script&lang=js&
# ./resources/components/preview-documents.vue
# ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/pages/create-report/upload-documents.vue?vue&type=script&lang=js&
# ./resources/pages/create-report/upload-documents.vue?vue&type=script&lang=js&
# ./resources/pages/create-report/upload-documents.vue
# ./.nuxt/router.js
# ./.nuxt/index.js
# ./.nuxt/server.js
# multi ./.nuxt/server.js
Related
I got this Error when i try to use PDFKit with vuejs and nuxtjs how can I fix it
ERROR in ./node_modules/fontkit/dist/module.mjs friendly-errors 15:00:37
Module parse failed: Unexpected token (7463:26) friendly-errors 15:00:37
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| };
| class $5340de7a86f3ae85$export$2e2bcd8739ae039 {
> static zeroMarkWidths = 'AFTER_GPOS';
| static plan(plan, glyphs, features) {
| // Plan the features we want to apply
friendly-errors 15:00:37
# ./node_modules/pdfkit/js/pdfkit.es5.js 5:0-30 3897:15-22 3899:15-22 3901:15-22
# ./node_modules/babel-loader/lib??ref--3-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=js&
# ./pages/index.vue?vue&type=script&lang=js&
# ./pages/index.vue
# ./.nuxt/router.js
# ./.nuxt/index.js
# ./.nuxt/client.js
# multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
friendly-errors 15:00:37
i Nuxt Bridge has now been released in beta. It has full composition API support and it's strongly recommended to migrate from #nuxtjs/composition-api, if possible, by following the steps at https://v3.nuxtjs.org/getting-started/bridge. Feedback welcome at https://github.com/nuxt-community/composition-api/discussions/585.
first it's error with can't find fs and I fix it but at least this one error i can't solve
I try to find any solve but I can't please help
I am working with a library called ReNative to deploy a React Native application to multiple platforms.
I am doing the tests on a Tizen and Android Tv emulators.
Creating an app with the basic blank template works with no problems.
But after installing the react-native-video plugin (using rnv plugin add) and using the Video component I get the following error when lauching the application with rnv run -p tizen (or androidtv):
ERROR in ./node_modules/react-native-video/Video.js
Module not found: Error: Can't resolve 'react-native/Libraries/Image/resolveAssetSource' in 'C:\dev\ReactNativeVideoReNative\node_modules\react-native-video'
# ./node_modules/react-native-video/Video.js 4:47-105
# ./src/app.js
# ./index.tizen.js
# multi (webpack)-dev-server/client?http://0.0.0.0:8087 (webpack)/hot/dev-server.js ./index.tizen.js
ERROR in ./src/assets/BigBuckBunny.mp4 1:0
Module parse failed: Unexpected character ' ' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
# ./src/app.js 7:41-77
# ./index.tizen.js
# multi (webpack)-dev-server/client?http://0.0.0.0:8087 (webpack)/hot/dev-server.js ./index.tizen.js
Or if you want to see a screenshot:
https://prnt.sc/rg3c1f
Here is an screenshot of the code: https://prnt.sc/rg3gm9
I literally have zero experience with this tool. So, if there is any information that is missing or that you need, tell me.
I created a new aurelia project and installed gojs via npm. I added gojs to the aurelia.json dependencies and, without adding any gojs code, just tried to build the project. The build worked fine and gojs went to the vendor-bundle.js The issue is, when I run the project, I get an error from gojs. When I remove the gojs dependency in aurelia.json, the project runs just fine but adding it back always throws the same error located below. Please help.
Uncaught Error: Mismatched anonymous define() module: [object Object]
http://requirejs.org/docs/errors.html#mismatch
at makeError (vendor-bundle.js:11531)
at intakeDefines (vendor-bundle.js:12617)
at vendor-bundle.js:12815
makeError # vendor-bundle.js:11531
intakeDefines # vendor-bundle.js:12617
(anonymous) # vendor-bundle.js:12815
setTimeout (async)
req.nextTick # vendor-bundle.js:13178
localRequire # vendor-bundle.js:12812
requirejs # vendor-bundle.js:13160
(anonymous) # vendor-bundle.js:13199
(anonymous) # vendor-bundle.js:13508
To clear up some confusion here, you're talking about declaring the dependency in aurelia.json which implies you're using aurelia-cli in conjunction with the requirejs loader.
jmdavid's answer mentions webpack which is a different beast altogether. You don't declare dependencies in aurelia.json there; webpack resolves those by itself via the imports it finds in your entry file. I would actually recommend switching to webpack for various reasons; the fact that it would fix the error is just one of them.
The error is likely caused by the go.js module being loaded twice. The error throws on the second load; it should still work regardless of the error. You can't make the error go away in any straightforward manner with requirejs, this is due to how the go.js release is packed.
The only error-free way to load go.js here would be to do so before requirejs is loaded. In aurelia.json:
"node_modules/gojs/release/go.js",
"node_modules/requirejs/require.js"
And no need to import it then either, it will just be available globally.
Probably the versions are oudated on fedoranimus github (https://github.com/fedoranimus/aurelia-gojs).
I made it work by creating a new project with the cli (au new) with webpack and typescript, then npm installed gojs (version "^1.8.15"), then copied relevant code from fedoranimus.
I'm trying to run some Dart templates from Stagehand. The 'ubersimplewebapp' app works. There's almost nothing to it. I've tried a couple of others and they don't. I'm currently trying to get 'webapp' to work. In install using PHPStorm and there are no errors. When I run it in the Chromium browser, I get the following console errors:
GET http://dartorium.loc/packages/browser/dart.js
GET http://dartorium.loc/packages/dartorium/nav_menu.dart
An error occurred loading file: package:dartorium/nav_menu.dart
GET http://dartorium.loc/packages/route_hierarchical/client.dart
An error occurred loading file: package:route_hierarchical/client.dart
GET http://dartorium.loc/packages/dartorium/reverser.dart
An error occurred loading file: package:dartorium/reverser.dart
This is the pubspec.yaml file:
name: 'dartorium'
version: 0.0.1
description: >
A minimal web app for the developer that doesn’t want to be confused by too
much going on.
#author: <your name> <email#example.com>
#homepage: https://www.example.com
environment:
sdk: '>=1.0.0 <2.0.0'
dependencies:
browser: any
sass: '>=0.4.0 <0.5.0'
script_inliner: '>=1.0.0 <2.0.0'
route_hierarchical: '>=0.5.0 <0.7.0'
transformers:
- script_inliner
#- sass:
# style: compressed
This is the log from installing the template the PHPStorm produced:
Working dir: /Volumes/Data/htdocs/dartorium
/usr/local/opt/dart/libexec/bin/pub get
Resolving dependencies...
+ analyzer 0.22.4 (0.24.0 available)
+ args 0.12.2+6
+ barback 0.15.2+4
+ browser 0.10.0+2
+ cli_util 0.0.1+1
+ code_transformers 0.2.5
+ collection 1.1.0
+ csslib 0.11.0+4
+ html5lib 0.12.0
+ logging 0.9.3
+ path 1.3.3
+ pool 1.0.1
+ route_hierarchical 0.6.1+1
+ sass 0.4.2
+ script_inliner 1.0.0
+ source_maps 0.10.0+1
+ source_span 1.0.3
+ stack_trace 1.2.1
+ utf 0.9.0+2
+ watcher 0.9.4
+ when 0.2.0
+ which 0.1.3
Changed 22 dependencies!
Precompiling dependencies...
Loading source assets...
Loading script_inliner transformers...
Precompiled script_inliner.
Process finished with exit code 0
A directory snapshot
My vhosts entry just in case:
<VirtualHost *:80>
ServerName dartorium.loc
DocumentRoot "/Volumes/Data/htdocs/dartorium/web"
<directory /Volumes/Data/htdocs/dartorium>
Allow from all
Options -MultiViews
Require all granted
</directory>
</VirtualHost>
Update
I decided to try creating the app outside of PHPStorm. I deleted the app and did 'stagehand webapp' in Terminal to install it again and then 'pub get'. I still got the same errors.
I then noticed a comment in the output that said to do 'pub serve' and then connect to the site on localhost:8080. When I did that, the app ran fine. So now my question is how do you run the app using Apache?
Answer
The accepted answer below given by Günter Zöchbauer solved the problem. In addition to what is described there, I made two other changes. After any change in the code, I run 'pub build'. I'm spoiled by working in PHP and RoR using RubyMine where all I have to do is refresh the browser. The other change was to my vhosts entry. It's now set to:
<VirtualHost *:80>
ServerName dartorium.loc
DocumentRoot "/Volumes/Data/htdocs/dartorium/build/web"
</VirtualHost>
I had originally added the permissions to fix some access problems I had before starting this post. It turns out they weren't necessary. The entry now points to build/web instead of the web directory in which you work.
You need to run pub build to generate JavaScript output (in build/web). This build output can be served by apache.
The build output works fine in Chrome without change. To make it work in Dartium I changed the script tags:
<script src="main.dart.js"></script>
<!--<script type="application/dart" src="main.dart"></script> -->
<!--<script data-pub-inline src="packages/browser/dart.js"></script>-->
I've been trying to make my lighttpd work for almost two weeks now, but without any luck.
I have a Zyxcel 310 with FFP 0.7 running on a stick. I have transmission working on it just fine (witch includes the "curl" install) but Lighttpd will not work.
This is the error I keep getting. (If I disable fastcgi I just get 503 forbidden).
2013-07-02 21:12:22: (log.c.166) server started
2013-07-02 21:12:22: (mod_fastcgi.c.1103) the fastcgi-backend /ffp/bin/php-cgi failed to start:
2013-07-02 21:12:22: (mod_fastcgi.c.1107) child exited with status 16 /ffp/bin/php-cgi
2013-07-02 21:12:22: (mod_fastcgi.c.1110) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2013-07-02 21:12:22: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed.
2013-07-02 21:12:22: (server.c.945) Configuration of plugins failed. Going down.
I have searched al over and nobody really seems to know what is up. Some fixed the issue but there fix didn't help me.
This is what some one suggested but I also get an error here:
root#nsa310:~# php -i
php: can't load library 'libxml2.so.2'
I bought a new website last week after months of building/testing it on localhost. It is far from done yet but I tought buying it would atleast be a start. The website would be www.volunteeringnews.com "sadly still empty now".
So if someone might have an idea or an error log where I might find some more information I would be very thankfull. Anyway, here are my conf settings. (Part of it, the beginning).
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
############ Options you really have to take care of ####################
## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
"mod_redirect",
"mod_alias",
"mod_access",
# "mod_cml",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
"mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
"mod_cgi",
"mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )
server.modules += ( "mod_fastcgi" )
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/mnt/HD_a2/public/website/www/"
server.upload-dirs = ( "/mnt/HD_a2/tmp" )
## where to send error-messages to
server.errorlog = "/mnt/HD_a2/public/website/logs/error.log"
# files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
## php support
## uncomment the following lines and the mod_fastcgi module above
fastcgi.server = ( ".php" => ((
"bin-path" => "/ffp/bin/php-cgi",
"socket" => "/tmp/php-cgi.socket",
"max-procs" => 2
)))
I fixed this by installing FFP 0.7 on my NAS direcly. :)