Cannot run in production mode - production-environment

I have a donejs application and its running ok in development mode donejs develop, but when I run it in production mode:
donejs build
donejs deploy (to firebase)
NODE_ENV=production donejs start
it will not start and show an error (see CODE A)
This file: file:my-app/dist/bundles/my-app/index.js:704 corresponds to JQuery 3.x and its not a dependency of the project itself but a dependency of can-connect-feathers (https://github.com/canjs/can-connect-feathers). In fact in index.js there is also included JQuery 2.x what makes me think there might be some sort of incompatibility among them.
I already tried changing the project's dependency to JQuery 3.x but didn't help. Actually it will make even donejs develop fail (see CODE B).
I also tried the following:
cd my-app/node_modules/steal
npm install
but didn't help, another error appears and finally tried cd my-app/node_modules/can && npm install but that end up in multiple errors.
I'm using:
donejs#0.9.2
node#4.6.2
npm#2.15.11
can-connect-feathers#1.2.1
CODE A
NODE_ENV=production donejs start
my-app#0.0.0 start my-app
done-serve --proxy http://localhost:3030 --port 8080
done-serve starting on http://localhost:8080
Potentially unhandled rejection [5] TypeError: Error loading "package.json!npm" at file:my-app/package.json
Error loading "bundles/my-app/index" at file:my-app/dist/bundles/my-app/index.js
Error evaluating file:my-app/dist/bundles/my-app/index.js
Cannot read property 'createElement' of undefined
at i (file:my-app/dist/bundles/my-app/index.js:704:20)
at file:my-app/dist/bundles/my-app/index.js:1039:2881
at file:my-app/dist/bundles/my-app/index.js:1039:3580
at file:my-app/dist/bundles/my-app/index.js:268:21
at file:my-app/dist/bundles/my-app/index.js:268:27
at Object.exports.runInThisContext (vm.js:54:17)
at doEval (my-app/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:2059:10)
at __eval (my-app/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:1976:7)
at Loader.exec [as __exec] (my-app/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:339:5)
at Loader.loader.instantiate (my-app/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:1517:16)
CODE B
donejs develop
my-app#0.0.0 develop my-app
done-serve --develop --proxy http://localhost:3030 --port 8080
done-serve starting on http://localhost:8080
Potentially unhandled rejection [8] Error: Error loading "my-app#0.0.0#index.stache!done-autorender#0.8.0#autorender" at <unknown>
Error loading "can#2.3.27#util/jquery/jquery" at file:my-app/node_modules/can/util/jquery/jquery.js
Error loading "can#2.3.27#util/jquery/jquery" from "done-autorender#0.8.0#autorender" at file:my-app/node_modules/done-autorender/src/autorender.js
Did not find ./node_modules/can/node_modules/jquery/package.json
at FetchTask.utils.extend.next (file:my-app/node_modules/steal/ext/npm-crawl.js:532:11)
at file:my-app/node_modules/steal/ext/npm-crawl.js:556:33
at tryCatchReject (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1183:30)
at runContinuation1 (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1142:4)
at Fulfilled.when (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:930:4)
at Pending.run (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:821:13)
at Scheduler._drain (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:97:19)
at Scheduler.drain (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:62:9)
at nextTickCallbackWith0Args (node.js:436:9)
at process._tickCallback (node.js:365:13)
Potentially unhandled rejection [16] Error: Error loading "can#2.3.27#util/jquery/jquery" at file:my-app/node_modules/can/util/jquery/jquery.js
Error loading "can#2.3.27#util/jquery/jquery" from "my-app#0.0.0#index.stache!done-autorender#0.8.0#autorender" at file:my-app/src/index.stache
Did not find ./node_modules/can/node_modules/jquery/package.json
at FetchTask.utils.extend.next (file:my-app/node_modules/steal/ext/npm-crawl.js:532:11)
at file:my-app/node_modules/steal/ext/npm-crawl.js:556:33
at tryCatchReject (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1183:30)
at runContinuation1 (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1142:4)
at Fulfilled.when (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:930:4)
at Pending.run (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:821:13)
at Scheduler._drain (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:97:19)
at Scheduler.drain (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:62:9)
at nextTickCallbackWith0Args (node.js:436:9)
at process._tickCallback (node.js:365:13)

If the double jQuery installation is the issue, it should be resolved by version 2.0.0, which is exactly the same as the 1.0 version, but requires that you pass in a jQuery package as the jquery option. So, in addition to whatever else you had in your can-connect-feathers config, you'll need to provide the jquery option:
import $ from 'jquery'
import Feathers from 'can-connect-feathers';
new Feathers({
jquery: $
});

Related

Nuxtjs - Nuxt/Image module having issues on deployment

Im building a static page in nuxtjs. I added the module nuxt/image and set it up according to the instructions in the documentation. (static with self hosted images)
ssr:true,
target: 'statics",
buildModules: [
// https://go.nuxtjs.dev/vuetify
'#nuxtjs/vuetify',
//https://image.nuxtjs.org
'#nuxt/image'
],
<nuxt-link :to="localePath('/')">
<nuxt-img
id="header-logo"
format="webp"
src="/logos/logo.png">
</nuxt-img>
</nuxt-link>
When i run npm run dev the project compiles but then the development server exists without any errors.
When I deploy it to the server through github actions the action breaks and exits on nuxt generate with the exit code: /home/githubaction/actions-runner/workspace/_temp/eb47b4c6-6c0d-42cc-[9](https://github.com/xxxxxx/xxxxx/runs/6722739489?check_suite_focus=true#step:9:10)019-dca85b061dda.sh: line 1: 17085 Segmentation fault npm run generate Error: Process completed with exit code 139.
Any idea why is that?
Update
I downgraded from version 0.6.2 to 0.6.0 and this seems to resolve the issue.

What causes this webpack code 2 error and how to solve it?

Cannot even build in sidekick after a simple change
I created a new Core/TS project in Sidekick, I built the app and developed some stuff, but later I changed the icon to a nicer one (which requires a new build, no HMR for this type of change obviously), now I cannot build my app (cloud build, because I don't have Android Studio).
I checked the /main/assets/app/ and the icons were successfully changed there and they were existed.
What is happening? How do I fix this big issue? My patience bottle with all these critical errors even after simple changes is getting emptied.
I also tried "removing .cloud and folder directories", and clicking "clean cloud processes", adding "clean" option, etc...
But none worked.
I also updated the webpack.config.js file, with node_modules.bin\update-ns-webpack --configs
The file got successfully updated, but still did not solve the problem and I still cannot build.
Still after many hours cannot cloud build my app in sidekick. I also tried tns platform remove android, tns install, etc, etc... none worked out.
this is the error message:
[00:00:18.521] [WARN] Executing webpack failed with exit code 2.
[00:00:18.681] [ERROR] clean-webpack-plugin: /mnt/storage/builds/_/af8fe992d35e76b54f5523261a83dac973ffc9ed/5.3.4/5.3.1/Spread/platforms/android/app/src/main/assets/app/**/* has been removed.
Executing webpack failed with exit code 2.
'Build failed with error code 2'.
[19-06-10 19:13:56.767] Couldn't enable debugging for EP7333JKFA, Error: Couldn't enable debugging for EP7333JKFA
at Errors.fail (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:126:28)
at Errors.failWithoutHelp (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:136:21)
at LiveSyncService.<anonymous> (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:253:30)
at Generator.next (<anonymous>)
at C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:13:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:9:12)
at LiveSyncService.enableDebuggingCoreWithoutWaitingCurrentAction (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:250:16)
at LiveSyncService.enableDebuggingCoreWithoutWaitingCurrentAction (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\decorators.js:67:47)
at LiveSyncService.<anonymous> (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:290:25)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:10:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
OUTPUT 2
EDIT:
SOLVED
https://github.com/NativeScript/sidekick-feedback/issues/384#issuecomment-508028462
I know this isn't an answer, but it is happening to me, too. I am running Nativescript 5.4.1. I can build with webpack, but as soon as I try to run with AOT or Uglify, I can't build and the error message isn't very helpful.
Try to remove and add 'nativescript-dev-webpack'-plugin using nativescript-sidekick-GUI, this resolve my issue...

Ignite web console backend not working - Error: Not Found: /signup

I am running Apache Ignite 2.4.0 and configured Ignite web console using following steps Ignite webconsole build and deploy
same has been configured for production mode in Apache server and after successfully starting Backend, when i access web console from front end I am getting below signup error on Backend Node application console. I have tried multiple configurations but none of them seems to work.
Error: Not Found: /signup
at app.use (/recon/Ignite/web-console/backend/app/apiServer.js:64:33)
at Layer.handle [as handle_request] (/recon/Ignite/web-console/backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:317:13)
at /recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:335:12)
at next (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:275:10)
at SessionStrategy.strategy.pass (/recon/Ignite/web-console/backend/node_modules/passport/lib/middleware/authenticate.js:325:9)
at SessionStrategy.authenticate (/recon/Ignite/web-console/backend/node_modules/passport/lib/strategies/session.js:71:10)
at attempt (/recon/Ignite/web-console/backend/node_modules/passport/lib/middleware/authenticate.js:348:16)
at authenticate (/recon/Ignite/web-console/backend/node_modules/passport/lib/middleware/authenticate.js:349:7)
at Layer.handle [as handle_request] (/recon/Ignite/web-console/backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:317:13)
at /recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:335:12)
at next (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:275:10)
at initialize (/recon/Ignite/web-console/backend/node_modules/passport/lib/middleware/initialize.js:53:5)
at Layer.handle [as handle_request] (/recon/Ignite/web-console/backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:317:13)
at /recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:335:12)
at next (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:275:10)
Snady, ignite-2.5.0 is on vote now and may be released in several days. I think it make sense to use this version.
Requirements: NodeJS 8.x & MongoDB 3.4.x. // Make sure you have this.
So, I downloaded sources and do the following:
In first terminal:
cd {apache-ignite-2.5.0}/modules/web-console/backend
npm install --no-optional
npm start
In second terminal:
cd {apache-ignite-2.5.0}/modules/web-console/frontend
npm install --no-optional
npm start
In browser do: http://localhost:9000/
EDIT:
Will Ignite Web Console in Docker works for your case?
See: https://hub.docker.com/r/apacheignite/web-console-standalone/

Skeleton list isn't available with DocPad run command

When I use the command d:\path>docpad run, I have only one choice with Skeleton because I get an error when DocPad tried to updating exchange.
The output of this command:
D:\path>docpad run
info: Welcome to DocPad v6.69.1 (global installation: C:\Users\v20100v\AppData\Roaming\npm\node_modules\docpad)
notice: If everyone who saw this message donated $1/week, maintaining DocPad would become sustainable: http://docpad.org/donate
info: Contribute: http://docpad.org/docs/contribute
info: Plugins:
info: Environment: development
info: Updating the exchange...
This can take a moment...
notice: An error occured fetching the exchange data, this is okay, but not all skeletons will be available to you undefined { code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }
info: You are about to create your new project inside your current directory. Below is a list of skeletons to bootstrap
your new project:
1. No Skeleton
Prefer to start from scratch? You can get started without any skeleton if you wish
Which skeleton will you use? [1-1]
1. No Skeleton
>
Information about my configuration :
-> Windows 7
-> node v0.10.13
-> npm v1.3.2
-> docpad v6.69.1
May be a proxy problem, but node and npm work fine with my configuration proxy.
Any idea how to fix this?

Docpad Run, errors and warnings

Node.js and Docpad are installed via: http://docpad.org/docs/install
npm install -fg docpad#6.21
docpad run via: http://docpad.org/docs/start
mkdir my-website
cd my-website
docpad run
Selected 6.) Hogan (Skeleteon)
and got this:
info: Installed the skeleton succesfully
info: DocPad listening to http://localhost:9778/ on directory c:\Users\DM\My Doc
uments\MDM\Web Projects\Client Projects\Web-Mart\Development\Website\out
info: LiveReload listening to new socket on channel /docpad-livereload with log
level 1
info: Generating...
warning:
Rendering the extension "eco" to "html" on "index.html.eco" didn't do anything
.
Explanation here: http://docpad.org/extension-not-rendering
warning:
Rendering the extension "eco" to "html" on "footer.html.eco" didn't do anythin
g.
Explanation here: http://docpad.org/extension-not-rendering
warning: Something went wrong while rendering: c:\Users\DM\My Documents\MDM\Web
Projects\Client Projects\Web-Mart\Development\Website\src\layouts\default.html.e
co
warning: Something went wrong while rendering: c:\Users\DM\My Documents\MDM\Web
Projects\Client Projects\Web-Mart\Development\Website\src\layouts\primary.html.e
co
warning: Something went wrong while rendering: c:\Users\DM\My Documents\MDM\Web
Projects\Client Projects\Web-Mart\Development\Website\src\documents\index.html.e
co
error: Something went wrong with the action
error: An error occured:
TypeError: Object #<Object> has no method 'getFileUrl'
at Object.eval (eval at <anonymous> (C:\Users\DM\Documents\MDM\Web Projects\
Client Projects\Web-Mart\Development\Website\node_modules\docpad-plugin-eco\node
_modules\eco\lib\compiler.js:19:12))
at Object.eval (eval at <anonymous> (C:\Users\DM\Documents\MDM\Web Projects\
Client Projects\Web-Mart\Development\Website\node_modules\docpad-plugin-eco\node
_modules\eco\lib\compiler.js:19:12))
at eval (eval at <anonymous> (C:\Users\DM\Documents\MDM\Web Projects\Client
Projects\Web-Mart\Development\Website\node_modules\docpad-plugin-eco\node_module
s\eco\lib\compiler.js:19:12))
at Function.eco.render (C:\Users\DM\Documents\MDM\Web Projects\Client Projec
ts\Web-Mart\Development\Website\node_modules\docpad-plugin-eco\node_modules\eco\
lib\index.js:26:25)
at EcoPlugin.module.exports.EcoPlugin.render (C:\Users\DM\Documents\MDM\Web
Projects\Client Projects\Web-Mart\Development\Website\node_modules\docpad-plugin
-eco\out\eco.plugin.js:23:37)
at Object.balUtilFlow.fireWithOptionalCallback (c:\Users\DM\AppData\Roaming\
npm\node_modules\docpad\node_modules\bal-util\out\lib\flow.js:39:27)
at BasePlugin.bindEvents (c:\Users\DM\AppData\Roaming\npm\node_modules\docpa
d\out\lib\plugin.js:57:26)
at Object.balUtilFlow.fireWithOptionalCallback (c:\Users\DM\AppData\Roaming\
npm\node_modules\docpad\node_modules\bal-util\out\lib\flow.js:32:27)
at Object.EventEmitterEnhanced.emitSync (c:\Users\DM\AppData\Roaming\npm\nod
e_modules\docpad\node_modules\bal-util\out\lib\events.js:49:30)
at Object.balUtilFlow.fireWithOptionalCallback (c:\Users\DM\AppData\Roaming\
npm\node_modules\docpad\node_modules\bal-util\out\lib\flow.js:32:27)
I've never gotten past these warnings and errors and it'd be very nice to be able to use docpad so I am grateful for any ideas on how to rid my seeming Docpad curse. Thank you.
Yeah the skeleton is broken, I don't know who's maintaining it. Like I mentioned in IRC, for others that might read/need I'll post here too...
You can use a empty folder and do this from the shell or you can just use the empty template:
cd $(mktemp -d) && npm i docpad docpad-plugin-hogan && \
mkdir -p src/{documents,files,layouts} && \
curl https://raw.github.com/docpad/docpad-plugin-hogan/master/test/src/documents/hogan.html.hogan \
> src/documents/index.html.hogan && docpad run
Should work to demonstrate hogan plugin and docpad itself work fine.
Personally I always start with a package.json but thats just how I like to do it, define plugins as you need them in there but you can all just do it manually as well... Or use the basic HTML5 boilerplate plugin and then add docpad-plugin-hogan etc.
Or wait until it get fixed if you must have that skeleton...

Resources