MEAN.IO Slack.js error - mean-stack

I've installed MEAN.IO as in the instructions here: http://mean.io/#!/docs
Along the lines I did see some errors in the installation process and I had to manually install grunt-cli globally.
When I create a testapp and run grunt then this is my output:
MEAN:~/testApp$ grunt
Running "clean:0" (clean) task
Running "jshint:all" (jshint) task
packages/slack/server/routes/slack.js
2 |var posts = require("../controllers/posts");
^ Strings must use singlequote.
11 | });
^ Missing semicolon.
11 | });
^ Expected an identifier and instead saw ')'.
11 | });
^ Expected an assignment or function call and instead saw an expression.
22 |};
^ Expected '(end)' and instead saw '}'.
14 | app.get('/slack/all', auth.requiresLogin, function(req, res, next){
^ 'app' is not defined.
14 | app.get('/slack/all', auth.requiresLogin, function(req, res, next){
^ 'auth' is not defined.
15 | Slack.render('index', {
^ 'Slack' is not defined.
>> 8 errors in 47 files
Warning: Task "jshint:all" failed. Use --force to continue.
Aborted due to warnings.
What's going wrong here?
For completeness here are my versions:
MEAN:~/testApp$ mean -v && npm -v && node -v
0.5.7
1.4.14
v0.10.29

I am very new to the MEAN.io framework and just install it and got the same error. The simplest way around it seems to be running the following in the root directory of the app.
mean package -d slack
then
mean package slack
Fixed it for me. Seems there was an update 6 hours ago.

Jay is correct. You can see this commit https://github.com/linnovate/mean/commit/433609f295dc4377882998e7e811c9a307bcbe89 that slack has been removed from the project.
You have 3 ways to correct the issue.
git pull upstream master to get the new updates
Do as Jay suggested by removing the slack package
Create a clean project with mean init myApp

Related

Error go test -v on https://github.com/slicen/cert-manager-webhook-linode

I completely make a config and create a token on linode
but i got this error when try to test my fetch-test-binaries.sh
this is the message
go test -v
# github.com/slicen/cert-manager-webhook-linode [github.com/slicen/cert-manager-webhook-linode.test]
./main_test.go:20:7: undefined: dns.SetBinariesPath
./main_test.go:20:23: undefined: kubeBuilderBinPath
FAIL github.com/slicen/cert-manager-webhook-linode [build failed]
make: *** [Makefile:15: verify] Error 2
can someone help me to resolve please ?
The error on file
main_test.go line 7 & 23 Link FIle : https://github.com/slicen/cert-manager-webhook-linode/blob/master/main_test.go
and makefile line 15 Link File : https://github.com/slicen/cert-manager-webhook-linode/blob/master/Makefile
The Repository Link : https://github.com/slicen/cert-manager-webhook-linode
I have tried to resolve with downgrade or upgrade my Go Version and searching but i found nothing,
I tried to just go test -v(not doing anything, just clone & go test) but i got same error
Please Help me, Thanks
SetBinariesPath was removed from cert-manager in commit cd92bf321fe14f857f34763583071e068f6c96b3
github.com/slicen/cert-manager-webhook-linode was updated to a newer version of cert-manager in commit 7131f7755b1278e48341f0d71fabac5b56b964fb - and it looks like that moved to a version of cert-manager which includes the removal of SetBinariesPath. The var declaration for kubeBuilderBinPath was correctly stripped away, but the call to dns.SetBinariesPath and a reference to the now removed kubeBuilderBinPath still remain.
So, essentially the code in main_test.go is invalid - at minimum line 20 should be removed.

When using "npm run watch" the webpack get compiled with 2 erros and 6 warnings

I'm trying to use Laravel CMS for my portfolio when using the exact same repo on my mac I get no errors or warnings, but when I try using it on my Windows PC I get 6 warning and 2 errors. I'm a beginner level developer, so I don't really know how to read those warnings/errors.
Edit 1:
I forgot to mention that the path i used at first was public/images/<image.png> and the same error occured.
Aplication version's:
Php: 8.1.5
Laravel: 9.11.0
npm: 8.5.5
Here is the error snippet:
npm run watch
> watch
> mix watch
Error: Can't resolve '../../storage/app/resources/images/achtergrond.png' in 'C:\portfolio\resources\css'
at finishWithoutResolve (C:\node_modules\enhanced-resolve\lib\Resolver.js:309:18)
at C:\node_modules\enhanced-resolve\lib\Resolver.js:386:15
at C:\node_modules\enhanced-resolve\lib\Resolver.js:435:5
at eval (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1
)
at C:\node_modules\enhanced-resolve\lib\Resolver.js:435:5
at eval (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:27:1
)
at C:\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:87:43
at C:\node_modules\enhanced-resolve\lib\Resolver.js:435:5
at eval (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1
)
at C:\node_modules\enhanced-resolve\lib\Resolver.js:435:5
at processResult (C:\node_modules\webpack\lib\NormalModule.js:758:19)
at C:\node_modules\webpack\lib\NormalModule.js:860:5
at C:\node_modules\loader-runner\lib\LoaderRunner.js:400:11
at C:\node_modules\loader-runner\lib\LoaderRunner.js:252:18
at context.callback (C:\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
at Object.loader (C:\node_modules\css-loader\dist\index.js:155:5)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors and 6 warnings
If you need any more information just send me a message.
Thanks in advance!

Deploying on Netlify throws an error with my GraphQL/Gatsby/Contentful query, demands needless query parameter

At first I was getting this error on my local build server, but I managed to fix it there... the query is still the same, but gatsby isn't throwing any errors with the query. But every time I try to deploy on Netlify it fails with the following message:
toFormat seems to be empty, we need a fileExtension to set it.
1 | fragment GatsbyContentfulFluid_tracedSVG on ContentfulFluid {
> 2 | tracedSVG
| ^
3 | aspectRatio
4 | src
5 | srcSet
6 | sizes
7 | }
failed during stage 'building site': Build script returned non-zero exit code: 1
8 |
9 | query optbuildreposrccomponentsshopProductsJs2136335468 {
10 | products: allContentfulProduct {
11 | edges {
12 | node {
Shutting down logging, 22 messages pending
File path: /opt/build/repo/src/components/shop/Products.js
Plugin: none
This is the same error I was getting locally and I have no idea why it is occurring. There should be no reason that toFormat is a required parameter. This is using the standard gatsby-source-contentful plugin API request which has always served the image without issue in the past. If I change the request to 'fixed' instead of 'fluid' the problem goes away, but I need fluid images for this part of the site.
I emailed the Netlify staff a few days ago, but am yet to receive a reply. Any help would be greatly appreciated.
For Those who are facing the same issue I came up with a simple solution.
Remove from all your file places that you used this extension _tracedSVG.
eg.
GatsbyContentfulFixed_tracedSVG
to
GatsbyContentfulFixed
Stop your gatsby server and use the follow command:
gatsby clean && gatsby develop
Commit and push your changes (in case you are using Github)
On Netlify find the option: Clear cache and deploy site
It should fix your Deployment on Netlify as well errors on your console :)
Two suggestions:
Local: Double check your content for any image references that do not append a suffix of .png or .jpg
Netlify: Clear cache and deploy site

Web starter kit gulp error on first install

trying out WSK, I just followed instructions on google dev website, this is my error after a $ gulp or $ gulp serve:
/folderpath/web-starter-kit-master/node_modules/gulp-ruby-sass/index.js:46
msg = msg.replace(new RegExp(path + '/?', 'g'), '');
^
SyntaxError: Invalid regular expression: //var/folders/F9/F9lleWHkHiiltRH5iZcuLk+++TI/-Tmp-/gulp-ruby-sass/?/: Nothing to repeat
at new RegExp (<anonymous>)
at /folderpath/web-starter-kit-master/node_modules/gulp-ruby-sass/index.js:46:21
at Array.forEach (native)
at removePaths (/folderpath/web-starter-kit-master/node_modules/gulp-ruby-sass/index.js:45:8)
at Socket.<anonymous> (/folderpath/web-starter-kit-master/node_modules /gulp-ruby-sass/index.js:118:14)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
Just ran into this (setting up WSK for the first time tonight too).
Looks like that was a bug that gulp-ruby-sass actually fixed a while ago:
https://github.com/rjm101/gulp-ruby-sass/commit/789d45f9b076781db652448a472357064a0f3e41
for whatever reason WSK doesn't have it yet in its node_modules dir.
I got this to work just by manually editing web-starter-kit-master/node_modules/gulp-ruby-sass/index.js locally and making the above linked change. I'm sure there's a more Proper way to deal with this but it's getting late and I'm losing patience :)

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