NextJS collecting page data fails with status code 500 - next.js

I have a NextJS application which builds an optimised front end. npm run build is now throwing this error:
> my-app#0.1.0 build C:\git\MyApp\MyApp-UI\src
> next build
info - Loaded env from C:\git\MyApp\MyApp-UI\src\.env.local
info - Loaded env from C:\git\MyApp\MyApp-UI\src\.env.production
(node:15540) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
info - Checking validity of types
info - Creating an optimized production build
info - Compiled successfully
When it gets to this point I see this:
info - Collecting page data ..
But a moment later that line disappears and I see this:
> Build error occurred
Error: Request failed with status code 500
at createError (C:\git\MyApp\MyApp-UI\src\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\git\MyApp\MyApp-UI\src\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\git\MyApp\MyApp-UI\src\node_modules\axios\lib\adapters\http.js:293:11)
at IncomingMessage.emit (events.js:387:35)
at endReadableNT (internal/streams/readable.js:1317:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'Error',
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
transformRequest: [ null ],
transformResponse: [ null ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
headers: { Accept: 'application/json', 'User-Agent': 'axios/0.23.0' },
method: 'get',
url: 'http://localhost:8080/api/v1/catalog/en-GB/pages',
data: null,
withCredentials: false
},
status: 500
}
info - Collecting page data .npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app#0.1.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
The package.json contains this:
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint ./ --ext js,jsx,ts,tsx",
"export": "next export",
"gzip": "gzipper compress --gzip-level 9 --verbose --output-file-format [filename].[ext] ./out ./zipped",
"sitemap": "node ./sitemap-generator/sitemap-gen.js",
"sitemap-index": "node ./sitemap-generator/sitemap-index-gen.js"
},
The URL at 8080 which provides the build-time data returns sensible content when I drop it into a browser. As far as I can see, there is no error there.
The basic question is, what would be causing this and where should I look to identify the source?
If this is something to do with the NODE_TLS_REJECT_UNAUTHORIZED environment variable, where/what do I need to adjust and what is that? (I can't find that variable in the solution.)

Turns out there was an error in the solution which was being called but due to errors being ignored I had not seen it get caught in the debugger.

Related

Unexpected error deploying NextJs app to Firebase Hosting with experimental web frameworks

I would like to deploy my NextJs app to Firebase hosting but I am having issues when running firebase deploy or firebase deploy --only hosting
I did run firebase experiments:enable webframeworks before firebase init hosting.
I am unable to deploy from the CLI, through the CI/CD on github or even open the emulators.
System:
Ubuntu 22.10
Node version 16.19.1 and npm version 8.19.3 (Using NVM, I have tried other versions)
Firebase-tools version 11.23.1 (Downloaded using auto install script as per docs)
NextJs version 13.1.6
The firebase-debug.log file has the following error:
[debug] [2023-02-17T21:36:36.278Z] Error: Command failed: npm i --omit dev --no-audit
at checkExecSyncError (node:child_process:828:11)
at Object.execSync (node:child_process:899:15)
at execSync (pkg/prelude/bootstrap.js:2115:30)
at prepareFrameworks (/home/rafael/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/frameworks/index.js:371:42)
at async deploy (/home/rafael/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/deploy/index.js:53:13)
[error]
[error] Error: An unexpected error has occurred.
and the npm logs have the following:
392 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
392 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
392 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
392 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
393 verbose stack Error: inotify#1.4.6 install: `node-gyp rebuild`
393 verbose stack spawn ENOENT
393 verbose stack at ChildProcess.<anonymous> (/snapshot/firepit/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
393 verbose stack at ChildProcess.emit (node:events:527:28)
393 verbose stack at maybeClose (node:internal/child_process:1092:16)
393 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
394 verbose pkgid inotify#1.4.6
395 verbose cwd /home/rafael/dev/protea/web/.firebase/protea-technology-services/functions
396 verbose Linux 5.19.0-31-generic
397 verbose argv "/usr/local/bin/firebase" "/snapshot/firepit/node_modules/npm/bin/npm-cli" "--script-shell=/home/rafael/.cache/firebase/runtime/shell" "--globalconfig=/home/rafael/.cache/firebase/runtime/npmrc" "--userconfig=/home/rafael/.cache/firebase/runtime/npmrc" "--scripts-prepend-node-path=auto" "i" "--omit" "dev" "--no-audit"
398 verbose node v16.16.0
399 verbose npm v6.14.18
400 error code ELIFECYCLE
401 error syscall spawn
402 error file /home/rafael/.cache/firebase/runtime/shell
403 error errno ENOENT
404 error inotify#1.4.6 install: `node-gyp rebuild`
404 error spawn ENOENT
405 error Failed at the inotify#1.4.6 install script.
405 error This is probably not a problem with npm. There is likely additional logging output above.
406 verbose exit [ 1, true ]
This is the hosting and functions rules in my firebase.json:
"hosting": {
"source": ".",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
"functions": [
{
"source": "functions",
"codebase": "default",
"ignore": [
"node_modules",
".git",
"firebase-debug.log",
"firebase-debug.*.log"
],
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}
],

Error: HTTP Error: 400, Invalid JSON payload received. Unknown name "skipLog": Cannot find field

I'm trying to setup firebase functions for the first time. I followed the steps in the docs, but when I run firebase init functions I run into this error:
Error: HTTP Error: 400, Invalid JSON payload received. Unknown name
"skipLog": Cannot find field.
Here is the extract from the firebase-debug.log file:
[debug] [2022-04-20T08:53:35.659Z] <<< [apiv2][body] POST https://serviceusage.googleapis.com/v1/projects/<my_project_name>/services/cloudfunctions.googleapis.com:enable {"error":{"code":400,"message":"Invalid JSON payload received. Unknown name \"skipLog\": Cannot find field.","status":"INVALID_ARGUMENT","details":[{"#type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"description":"Invalid JSON payload received. Unknown name \"skipLog\": Cannot find field."}]}]}}
[error]
[error] Error: HTTP Error: 400, Invalid JSON payload received. Unknown name "skipLog": Cannot find field.
[debug] [2022-04-20T08:53:35.670Z] Error Context: {
"body": {
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"skipLog\": Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"skipLog\": Cannot find field."
}
]
}
]
}
},
"response": {
"statusCode": 400
}
}
I had the same problem, managed to init functions with older version (10.6.0) of firebase-tools
To uninstall and reinstall using version 10.6.0:
npm uninstall -g firebase-tools
npm install -g firebase-tools#10.6.0
This fixed the problem for me.
curl -sL https://firebase.tools | upgrade=true bash
-- Checking for existing firebase-tools on PATH...
-- Your machine has firebase-tools#10.7.0, attempting upgrade...
-- Checking your machine type...
-- Downloading binary from https://firebase.tools/bin/linux/latest
######################################################################## 100.0%#=#=#
-- Setting permissions on binary...
-- Checking your PATH variable...
-- firebase-tools#10.8.0 is now installed
-- All Done!
I followed these instructions based on the answer here and it worked perfectly for me to get past the same error. Should we then later re-upgrade the firebase-tools at a later time?
To uninstall and reinstall using version 10.6.0:
npm uninstall -g firebase-tools npm install -g firebase-tools#10.6.0

Grisome build succeeds locally but fails on AWS Amplify

I have a Gridsome site that I'm trying to deploy to AWS Amplify.
The site builds fine and with no errors locally with gridsome build, however on AWS Amplify, it fails.
I initially thought the error was related to a non-SSR component I was using that required <ClientOnly> tags, as this was throwing warnings in my local build. However, I've since removed that component and the issue persists.
I also thought the issue may be due to some outdated dependencies being required by packages related to webpack, but after several hours of trying to resolve these, I'm relatively confident this is not the case.
I don't quite understand the error log, but I think the issue may be related to the large number of images on my website, and AWS Amplify running out of memory (ENOMEM) while processing them. I haven't been able to find a way to increase the memory allocation for AWS Amplify, if this is even the cause.
The AWS Amplify log provides the following information:
2020-04-23T14:21:23.331Z [WARNING]: Gridsome v0.7.14
2020-04-23T14:21:23.867Z [WARNING]: Initializing plugins...
2020-04-23T14:21:24.053Z [WARNING]: Load sources - 0.1s
2020-04-23T14:21:24.166Z [WARNING]: Create GraphQL schema - 0.11s
2020-04-23T14:21:24.200Z [WARNING]: Create pages and templates - 0.03s
2020-04-23T14:21:24.224Z [WARNING]: Generate temporary code - 0.02s
2020-04-23T14:21:24.224Z [WARNING]: Bootstrap finish - 0.89s
2020-04-23T14:21:24.226Z [WARNING]: Compiling assets...
2020-04-23T14:28:43.461Z [WARNING]: Compile assets - 439.23s
2020-04-23T14:28:43.487Z [WARNING]: Execute GraphQL (14 queries) - 0.03s
2020-04-23T14:28:43.492Z [WARNING]: Write out page data (14 files) - 0s
2020-04-23T14:28:45.196Z [WARNING]: Render HTML (14 files) - 1.7s
2020-04-23T14:28:45.198Z [WARNING]: Process files (0 files) - 0s
2020-04-23T14:28:45.563Z [INFO]: [2K
2020-04-23T14:28:45.563Z [INFO]: [1GProcessing images (7675 images) - 0%
2020-04-23T14:28:47.487Z [INFO]: [2K
2020-04-23T14:28:47.489Z [INFO]: [1GProcessing images (7675 images) - 0%
2020-04-23T14:28:47.579Z [INFO]: [2K[1G
2020-04-23T14:28:47.579Z [INFO]: Processing images (7675 images) - 1%
2020-04-23T14:28:48.834Z [INFO]: [2K[1GProcessing images (7675 images) - 1%
...
2020-04-23T14:33:25.168Z [INFO]: [2K[1GProcessing images (7675 images) - 41%
2020-04-23T14:33:26.901Z [WARNING]: internal/child_process.js:366
throw errnoException(err, 'spawn');
^
Error: spawn ENOMEM
at ChildProcess.spawn (internal/child_process.js:366:11)
at spawn (child_process.js:551:9)
at Object.fork (child_process.js:113:10)
at ChildProcessWorker.initialize (/codebuild/output/src926123643/src/website/node_modules/jest-worker/build/workers/ChildProcessWorker.js:105:44)
at ChildProcessWorker.onExit (/codebuild/output/src926123643/src/website/node_modules/jest-worker/build/workers/ChildProcessWorker.js:204:12)
at ChildProcess.emit (events.js:198:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
2020-04-23T14:33:27.254Z [WARNING]: npm
2020-04-23T14:33:27.254Z [WARNING]: ERR! code ELIFECYCLE
npm ERR! errno 1
2020-04-23T14:33:27.255Z [WARNING]: npm
2020-04-23T14:33:27.259Z [WARNING]: ERR! website# build: `gridsome build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the website# build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-04-23T14:33:27.270Z [WARNING]:
2020-04-23T14:33:27.270Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-04-23T14_33_27_259Z-debug.log
2020-04-23T14:33:27.270Z [HELP]: Outputting the npm debug log
0 info it worked if it ends with ok
1 verbose cli [ '/root/.nvm/versions/node/v10.16.0/bin/node',
1 verbose cli '/root/.nvm/versions/node/v10.16.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#6.9.0
3 info using node#v10.16.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle website#~prebuild: website#
6 info lifecycle website#~build: website#
7 verbose lifecycle website#~build: unsafe-perm in lifecycle true
8 verbose lifecycle website#~build: PATH: /root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/codebuild/output/src926123643/src/website/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.6/bin:/usr/local/rvm/gems/ruby-2.4.6#global/bin:/usr/local/rvm/rubies/ruby-2.4.6/bin:/usr/local/rvm/bin:/root/.yarn/bin:/root/.config/yarn/global/node_modules/.bin:/root/.nvm/versions/node/v10.16.0/bin:/root/.local/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle website#~build: CWD: /codebuild/output/src926123643/src/website
10 silly lifecycle website#~build: Args: [ '-c', 'gridsome build' ]
11 silly lifecycle website#~build: Returned: code: 1 signal: null
12 info lifecycle website#~build: Failed to exec build script
13 verbose stack Error: website# build: `gridsome build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid website#
15 verbose cwd /codebuild/output/src926123643/src/website
16 verbose Linux 4.14.165-103.209.amzn1.x86_64
17 verbose argv "/root/.nvm/versions/node/v10.16.0/bin/node" "/root/.nvm/versions/node/v10.16.0/bin/npm" "run" "build"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error website# build: `gridsome build`
22 error Exit status 1
23 error Failed at the website# build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
2020-04-23T14:33:27.291Z [ERROR]: !!! Build failed
2020-04-23T14:33:27.292Z [ERROR]: !!! Non-Zero Exit Code detected
2020-04-23T14:33:27.292Z [INFO]: # Starting environment caching...
2020-04-23T14:33:27.296Z [INFO]: # Environment caching completed
Terminating logging...
My package.json contains the following:
{
"name": "website",
"private": true,
"scripts": {
"build": "gridsome build",
"develop": "gridsome develop",
"explore": "gridsome explore"
},
"dependencies": {
"#gridsome/source-filesystem": "^0.6.2",
"#gridsome/transformer-remark": "^0.5.0",
"gridsome": "^0.7.14",
"gridsome-plugin-gtm": "^0.1.1",
"marked": "^0.8.0",
"vue-burger-menu": "^2.0.4",
"vue-easy-lightbox": "^0.11.0",
"vue-slick-carousel": "^1.0.5"
},
"devDependencies": {
"node-sass": "^4.13.1",
"normalize.css": "^8.0.1",
"sass-loader": "^8.0.2",
"style-resources-loader": "^1.3.3"
},
"browserslist": [
"defaults"
]
}
I'd be grateful for any help in trying to resolve this issue.
Thank you in advance.
UPDATE #1
I am now quite sure this is due to the large number of images being processed on my site via <g-image>.
I decided to try to build using AWS CodeBuild to see if I got any more information. It failed too, but did give me some more helpful errors.
When I removed all but a handful of images, the build works. Once I get above ~300 images being displayed at different dimensions, things start to fail. The error messages:
Process files (0 files) - 0s
...
[2K·[1GProcessing images (4671 images) - 58%Error: Failed to process image src/assets/media/jobs/1.jpg. spawn ENOMEM
at pMap.concurrency (/codebuild/output/src132267748/src/github.com/xxxxx/website/node_modules/gridsome/lib/workers/image-processor.js:113:13)
(sharp:31795): GLib-CRITICAL **: 04:50:22.507: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:31795): GLib-CRITICAL **: 04:50:22.516: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:31795): GLib-CRITICAL **: 04:50:22.516: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
(sharp:31795): GLib-CRITICAL **: 04:50:22.516: g_hash_table_lookup: assertion 'hash_table != NULL' failed
So, yeah, I guess this is a Gridsome bug?
UPDATE #2
Adding node-options=--max_old_space_size=4096 in the .npmrc file causes the build to hang and eventually timeout.
UPDATE #3
Batch resized images so the max width/height was 2000px (effective max file size of ~2MB). Builds are now succeeding.
Hopefully someone can assist with a solution so we can build from the source files without pre-processing images.
This appears to be a bug where Gridsome runs out of memory processing a large number of large files.
This workaround preprocesses all of the image files in order to reduce the load of each image before Gridsome tries to process them.
Preprocess images with Sharp
// image-preprocessor.js
const fs = require("fs");
const path = require("path");
const sharp = require("sharp");
const dirPath = "./src/assets/";
const maxWidth = 2000;
const maxHeight = 2000;
const getAllFiles = function(dirPath, arrayOfFiles) {
files = fs.readdirSync(dirPath);
arrayOfFiles = arrayOfFiles || [];
files.forEach(function(file) {
if (fs.statSync(`${dirPath}/${file}`).isDirectory()) {
arrayOfFiles = getAllFiles(`${dirPath}/${file}`, arrayOfFiles);
} else {
arrayOfFiles.push(path.join(__dirname, dirPath, "/", file));
}
});
return arrayOfFiles;
};
const result = getAllFiles(dirPath);
result.forEach(async (file) => {
await sharp(`${file}`)
.resize(maxWidth, maxHeight, {
fit: "inside",
})
.toBuffer(function(err, buffer) {
fs.writeFile(`${file}`, buffer, function(err) {
if (err) {
console.log(err);
}
});
});
});
Add the image preprocesser to the builspec
// buildspec.yml
...
build:
commands:
- node image-preprocessor.js
- npm run build
...
Note that because the preprocessing is done every time Gridsome is built via the buildpsec, the source images remain untouched in the repository (and ultimately await a proper fix to this issue).

is it possible to run meteor with mongoDB on Maverics 10.9.5?

I'm running OsX 10.9.5 and React 16. After meteor installation fallowed by instruction from site https://www.meteor.com/install, installation process goes without any problems.
When I'm trying run meteor from terminal meteor run I get this:
[[[[[ ~/Codding/cdbioffice ]]]]]
=> Started proxy.
dyld: Symbol not found: _fchmodat
Referenced from:
/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod
Expected in: /usr/lib/libSystem.B.dylib
in
/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod
Unexpected mongo exit code null. Restarting.
dyld: Symbol not found: _fchmodat
Referenced from:
/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod
Expected in: /usr/lib/libSystem.B.dylib
in
/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod
Unexpected mongo exit code null. Restarting.
dyld: Symbol not found: _fchmodat
Referenced from:
/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod
Expected in: /usr/lib/libSystem.B.dylib
in
/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod
Unexpected mongo exit code null. Restarting.
Can't start Mongo server
In VisualStudio from project directory after meteor npm start in terminal I get additional info:
npm ERR! code ELIFECYCLE
npm ERR! errno 254
npm ERR! cd-bioffice-meteor# start: `meteor run --settings settings.json`
npm ERR! Exit status 254
npm ERR!
npm ERR! Failed at the cd-bioffice-meteor# start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lukasz/.npm/_logs/2019-01-14T13_48_22_707Z-debug.log
and in log file:
0 info it worked if it ends with ok
1 verbose cli [ '/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node',
1 verbose cli '/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm',
1 verbose cli 'start' ]
2 info using npm#6.4.1
3 info using node#v8.11.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle cd-bioffice-meteor#~prestart: cd-bioffice-meteor#
6 info lifecycle cd-bioffice-meteor#~start: cd-bioffice-meteor#
7 verbose lifecycle cd-bioffice-meteor#~start: unsafe-perm in lifecycle true
8 verbose lifecycle cd-bioffice-meteor#~start: PATH: /Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/lukasz/Codding/cdbioffice/node_modules/.bin:/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin:/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64:/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/.bin:/Users/lukasz/.npm-global/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/Users/lukasz/.npm-global/bin
9 verbose lifecycle cd-bioffice-meteor#~start: CWD: /Users/lukasz/Codding/cdbioffice
10 silly lifecycle cd-bioffice-meteor#~start: Args: [ '-c', 'meteor run --settings settings.json' ]
11 silly lifecycle cd-bioffice-meteor#~start: Returned: code: 254 signal: null
12 info lifecycle cd-bioffice-meteor#~start: Failed to exec start script
13 verbose stack Error: cd-bioffice-meteor# start: `meteor run --settings settings.json`
13 verbose stack Exit status 254
13 verbose stack at EventEmitter.<anonymous> (/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid cd-bioffice-meteor#
15 verbose cwd /Users/lukasz/Codding/cdbioffice
16 verbose Darwin 13.4.0
17 verbose argv "/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Users/lukasz/.meteor/packages/meteor-tool/.1.8.0_2.cty1uc.prsil++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm" "start"
18 verbose node v8.11.4
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 254
22 error cd-bioffice-meteor# start: `meteor run --settings settings.json`
22 error Exit status 254
23 error Failed at the cd-bioffice-meteor# start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 254, true ]
What I'm doing wrong? I found bunch of answer on this topic but I'm not sure witch direction should I go. One of them is that OsX 10.9 is to old to run that config. I don't want to make this situation worst.
System:
Maverics 10.9.5
node -v && npm -v
v9.5.0
5.6.0
Thanks for your help.
package.json for existing project (I'm interested on):
{
"name": "cd-bioffice-meteor",
"private": true,
"scripts": {
"start": "meteor run --settings settings.json",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"#babel/runtime": "^7.1.5",
"bcrypt": "^3.0.0",
"meteor-node-stubs": "^0.4.1",
"moment": "^2.22.2",
"moment-timezone": "^0.5.21",
"npm": "^6.5.0",
"polished": "^2.0.3",
"react": "^16.5.1",
"react-bootstrap": "^0.32.4",
"react-dom": "^16.5.1",
"react-inlinesvg": "^0.8.1",
"react-router-bootstrap": "^0.24.4",
"react-router-dom": "^4.3.1",
"serialport": "^7.1.3",
"styled-components": "^3.4.6"
},
"meteor": {
"mainModule": {
"client": "client/main.jsx",
"server": "server/main.js"
},
"testModule": "tests/main.js"
}
}

Npm requests stopped by home router

Good day.
My machine runs on windows 7 32 bit. I've installed Node.jS via installer from nodejs.org.
When i try to do anything with NPM http request involved, it just stalls. No errors, just continues on and on forever.
With try and error I came to conclusion it is the fault of my home router. I tried setting up DMZ, port forwarding on :80 but nothing helps. Maybe the port is wrong, but i can't find which one to forward.
I don't use proxy and have dynamic ip.
this is how it goes:
C:\Users\By-the-ocean\Desktop\delme>npm install -ddd express
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli 'install',
npm verb cli '-ddd',
npm verb cli 'express' ]
npm info using npm#2.10.1
npm info using node#v0.12.4
npm verb install initial load of C:\Users\By-the-ocean\Desktop\delme\package.json
npm verb readDependencies loading dependencies from C:\Users\By-the-ocean\Desktop\delme\package.json
npm sill cache add args [ 'express', null ]
npm verb cache add spec express
npm sill cache add parsed spec { raw: 'express',
npm sill cache add scope: null,
npm sill cache add name: 'express',
npm sill cache add rawSpec: '',
npm sill cache add spec: '*',
npm sill cache add type: 'range' }
npm sill addNamed express#*
npm verb addNamed "*" is a valid semver range for express
npm sill addNameRange { name: 'express', range: '*', hasData: false }
npm sill mapToRegistry name express
npm sill mapToRegistry using default registry
npm sill mapToRegistry registry https://registry.npmjs.org/
npm sill mapToRegistry uri https://registry.npmjs.org/express
npm verb addNameRange registry:https://registry.npmjs.org/express not in flight;
fetching
npm verb request uri https://registry.npmjs.org/express
npm verb request no auth needed
npm info attempt registry request try #1 at 09:18:50
npm verb request id 50d2de54ad349278
npm http request GET https://registry.npmjs.org/express
/
A bit more details:
I'm on plain windows laptop connected to internet via router.
The request comes from the same machine to NPM servers (both http and https versions have been tried)
There is no way for me to connect without router directly via cabel.
Windows firewall has been turned off completely. no firewall on router either.

Resources