Strapi Server wasn't able to start properly. /documentation/: policy.split is not a function - mongodb

I recently encountered this error while starting strapi app. Everything was fine before. I have been searching but still no clue how to solve this. Has anyone encountered this error before?
> strapi start
[2021-01-23T11:19:49.618Z] debug ⛔️ Server wasn't able to start properly.
[2021-01-23T11:19:49.619Z] error Error creating endpoint get /documentation/: policy.split is not a function or its return value is not iterable
Please note that my app has no path /documentation. Except for strapi default path for its documentation.
Here my app dependencies, I tried with node 10, 12, 14, 15. All have the same error:
"dateformat": "^3.0.3",
"excel4node": "^1.7.2",
"nodemailer": "^6.4.11",
"os": "^0.1.1",
"sha256": "^0.2.0",
"strapi": "3.0.0-beta.20.3",
"strapi-admin": "3.0.0-beta.20.3",
"strapi-connector-mongoose": "3.0.0-beta.20.3",
"strapi-plugin-content-manager": "3.0.0-beta.20.3",
"strapi-plugin-content-type-builder": "3.0.0-beta.20.3",
"strapi-plugin-documentation": "^3.0.0-beta.20.3",
"strapi-plugin-email": "3.0.0-beta.20.3",
"strapi-plugin-upload": "3.0.0-beta.20.3",
"strapi-plugin-users-permissions": "3.0.0-beta.20.3",
"strapi-utils": "3.0.0-beta.20.3",
"uuid": "^8.3.1",
"xlsx": "^0.16.5"

Please follow these steps:
Replace ^3.0.0-beta.20.3 with 3.0.0-beta.20.3 from strapi-plugin-documentation dependency. (Notice the removal of ^).
Remove package-lock.json or yarn.lock file.
Reinstall the dependencies.
Now re-run Strapi and the issue must be resolved.

drop your table/schema and then create it again, go back to your terminal and run your start. The error will go away and your server will run as normal. This will be fixed in the next stripe version:
solution: Strapi server start error

Related

ng serve command suddenly stopped working

I've got this angular (12.2.12) app. Everything was working fine until today. When i tried ng serve --live-reload=false the process just failed. Browser application bundle generation completed successfully but right after that i've got this error message:
× 「wdm」: Error: invalid argument
at pathToArray (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:44:10)
at MemoryFileSystem.readdirSync (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:122:13)
at MemoryFileSystem.<computed> [as readdir] (app_path\node_modules\memory-fs\lib\MemoryFileSystem.js:279:34)
at app_path\node_modules\webpack\lib\CleanPlugin.js:65:7
at symbolIterator (app_path\node_modules\neo-async\async.js:3482:9)
at timesSync (app_path\node_modules\neo-async\async.js:2297:7)
at Object.eachLimit (app_path\node_modules\neo-async\async.js:3463:5)
at getDiffToFs (app_path\node_modules\webpack\lib\CleanPlugin.js:61:11)
at app_path\node_modules\webpack\lib\CleanPlugin.js:352:6
at Hook.eval [as callAsync] (eval at create (app_path\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:12:1)
I didn't change anything beisdes changing value for build / outputPath in angular.json (changing it back to previous value did not help to solve the problem). Any ideas what may be the problem?
One more thing: ng build works without any problems
Ok i apologize even tho i said i changed the outputPath back to it's previous value the opposite was true and i did not save the angular.json after changing it back.
Changing the value back and saving angular.json did actually resolve the issue. The problem happened because i changed the value of outputPath to shared network folder. This change caused ng serve to stop working.
(Not sure wheather to delete the question or keep it up with this answer)

Product images issue in vue storefornt

I integrated vue store front with magento 2, frontend works fine but product images not display in frontend. It throws error Unable to compile TypeScript:\nsrc/image/action/local/index.ts(27,18): error TS2339: Property 'query' does not exist on type 'Request<any, any, any, any>'. imagemagick is also installed and imgurl in local.json is also defined.
Anyone please know about this why error display.
It is about this.req which is typeof Request from express - it has query property. Please make sure you have yarn.lock from the original repo and reinstall dependencies.
If you are using docker, you might need to add:
- './yarn.lock/var/www/yarn.lock'
To volumes section in the docker-compose.nodejs.yml
i have found a simple solution you can try that
copy all your magento 2 pub/media data in vue-storefront-api/var/magento-folder/pub/media
Or
create a symlink if you are working on localhost
vue-storefront-api/config/local.json
"magento2": {
"imgUrl": "http://magento-domain/pub/media/catalog/product",
"assetPath": "/../var/magento-folder/pub/media",
}
vue-storefront/config/local.json
"images": {
"useExactUrlsNoProxy": false,
"baseUrl": "http://localhost:8080/img/",
"useSpecificImagePaths": false,
"paths": {
"product": "/catalog/product"
},
"productPlaceholder": "/assets/placeholder.jpg"
},
run command in vue-storefront and vue-storefront-api

webdriver-manager update failed to download chrome driver and update-config.json

When I clean webdriver-manager and update, it is unable to download chrome driver and update-config.json. Later on when I start protractor it is complaining couldn't find update-config.json.
package.json
"scripts": {
"webdrivermanager:update": "node node_modules/protractor/bin/webdriver-manager update --versions.standalone=3.4.0 --ignore_ssl",
"webdrivermanager:clean": "node node_modules/protractor/bin/webdriver-manager clean",
"install": "npm run webdrivermanager:clean && npm run webdrivermanager:update"
}
protractor.conf.js
seleniumServerJar: '../../node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar',
multiCapabilities: [
{browserName: 'chrome'}
//specify if any other browser
],
directConnect: true,
Now when I do npm install, I can not see chrome driver and
update-config.json at
node_modules\protractor\node_modules\webdriver-manager\selenium
location
webdriver-manager update log
> node node_modules/protractor/bin/webdriver-manager update --versions.standalon
e=3.4.0 --ignore_ssl
[09:58:34] I/http_utils - ignoring SSL certificate
(node:10944) UnhandledPromiseRejectionWarning: Unhandled promise rejection (reje
ction id: 1): TypeError: Cannot read property 'ListBucketResult' of undefined
[09:58:34] I/downloader - curl -o C:\..\..\node_mo
dules\protractor\node_modules\webdriver-manager\selenium/selenium-server-standal
one-3.4.0.jar https://selenium-release.storage.googleapis.com/3.4/selenium-serve
r-standalone-3.4.0.jar
[09:58:35] I/downloader - curl -o C:\..\..\node_mo
dules\protractor\node_modules\webdriver-manager\selenium/geckodriver-v0.16.1.zip
https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0
.16.1-win64.zip
[09:58:36] I/update - geckodriver: unzipping geckodriver-v0.16.1.zip
In my log also chrome driver is not downloading anymore. For this reason I can not start my protractor as update-config.json is not available. Any idea would be great. Thanks
During a previous update call, the xml response was cancelled before the file could be created. There are two options (features to fix this are not complete yet):
delete the chrome-response.xml and then call update again
wait an hour and make an update request again. The last modified time will invalidate that file and it will make a request and will replace the chrome-response.xml.
On my end, if my webdriver-manager instance was closed.
I am required to delete npm and npm-cache folders from roaming and reinstall protractor again.
Right after installing protractor, webdriver-manager update needs to be executed immediately.
If an error appears, make sure to run node.js cmd as an admin.
With these steps, I was able to download drivers properly.
That was very weird. I did everything nothing helped. Actual reason was my organization blocked the chrome driver api site. chrome-response.xml is the main clue that is showing access denied message so, I came to know actual reason.
I requested to #cnishina to thrown an actual error message if chrome driver website is not reached.

Unable to find the socket transport "ssl"

I'm trying to figure out "why" I'm getting an error message from the Joomla 3.X component Gcalendar (google calendar). The error message is below.
Error Unable to Connect to ssl://www.google.com:443. Error
#-912967449: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
I have read several other threads on here and other sites but most outline 'how' to enable/install/etc... SSL. I've copied/pasted the info.php data into a google doc here. Everything dealing with SSL is labeled as 'on' or 'installed.
The server is not 'public' right now, it is only available from within the school district's network. Could this be the reason for the problem?
Any ideas anyone?
ssl://www.google.com:443
should be
https://www.google.com:443
I just had this error as well. In my case it was because I was working locally, not on the live site. Once I put it live, it worked fine. Just putting this here in case anyone else comes across the same thing.
Install OpenSSL module for php:
1. In the php.ini file,
add this line "extension = php_openssl.dll"
2.Make sure that the folder "ext" have this dll,
if not then add the desired version.
Установить для php модуль OpenSSL:
1)В файле php.ини,
добавь строку "extension=php_openssl.dll"
2) Убедись что в папке "ext" есть эта dll,
если нет то добавте необходимой версии.

node.js - can't get mongodb to work, may have installed wrong?

I guess this is a shot in the dark since there's not a lot of specific code I can show you...
but I'm using node and trying to use mongodb, however I can't get mongodb to connect. I've tried a couple of tutorials that should pretty much work out of the box. in several cases pages that don't seem to have any immediate reference to the database will load ok. For example, a 'posts/new' page will load. but '/' which likely makes reference to showing posts, will just hang silently (the browser shows page loading).
If for example I got so submit a new post the browser hangs and in the terminal i get:
Express app started on port 3000
Error: Invalid ObjectId
at Function.fromString (/Users/xxx/Node_projects/noobjs/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js:27:11)
at ObjectId.cast (/Users/xxx/Node_projects/noobjs/node_modules/mongoose/lib/schema/objectid.js:99:16)
at ObjectId.castForQuery (/Users/xxx/Node_projects/noobjs/node_modules/mongoose/lib/schema/objectid.js:133:17)
at Query.cast (/Users/xxx/Node_projects/noobjs/node_modules/mongoose/lib/query.js:249:32)
at Query.findOne (/Users/xxx/Node_projects/noobjs/node_modules/mongoose/lib/query.js:851:10)
at Function.findOne (/Users/xxx/Node_projects/noobjs/node_modules/mongoose/lib/model.js:714:16)
at /Users/xxx/Node_projects/noobjs/routes/articles.js:13:13
at paramCallback (/Users/xxx/Node_projects/noobjs/node_modules/express/lib/router/index.js:259:7)
at param (/Users/xxx/Node_projects/noobjs/node_modules/express/lib/router/index.js:241:11)
at pass (/Users/xxx/Node_projects/noobjs/node_modules/express/lib/router/index.js:253:5)
GET /article/new 500
GET /articles/new 200
if it helps at all, here's the package.json for the tutorial app used above:
{
"name": "noobjs"
, "description": "A demo app in nodejs illustrating use of express, jade and mongoose"
, "version": "2.0.0"
, "private": true
, "author": "Madhusudhan M S (http://twitter.com/madhums)"
, "engines": {
"node": ">= 0.4.10"
}
, "dependencies": {
"express" : ">= 2.3.12"
, "jade" : ">= 0.12.4"
, "mongoose": ">= 1.4.0"
, "stylus" : ">= 0.13.7"
, "express-csrf" : ">= 0.3.3"
, "gzippo" : ">= 0.0.4"
, "express-messages" : ">= 0.0.2"
}
}
Also when I do ./mongod from the command line i get -bash: ./mongod: No such file or directory. Anything else I try from the terminal or browser doesnt seem to communicate with mongodb at all.
Let me know if there's anything I can do to diagnose/change my installation.
Step 0: ensure that MongoDB is running ps -ef | grep mongod. If it's not started, check the log file for the reason it failed.
Step 1: ensure that you can connect to MongoDB from the command line.
Step 2: check your connection method, there are several ways to do this, but ensure the you have the correct servername:post/dbname
Here's a blog post I wrote. That walks through a simple setup with Node.JS + MongoDB + Cloudfoundry. The simple setup works locally and on Cloudfoundry, so you should be able to ignore the Cloudfoundry steps and still get something working.