Coffee script path.exists deprecated notice from node.js - node.js

OSX 10.6
CoffeeScript 1.2.0
node.js v0.7.7-pre
I am seeing a deprecation notice every time I run the coffee command. The notice is this:
path.exists is deprecated. It is now called `fs.exists`.
I know that this is happening because node.js deprecated path.exists. See
https://github.com/joyent/node/pull/2587
I would think there would be a lot of info about this but all I can see is some indirect reference relating to a more serious issue saying it's not going to be 'fixed':
https://github.com/jashkenas/coffee-script/issues/2113
Am I the only one having this problem? Does anyone have a suggestion on how I can make this go away?

https://github.com/jashkenas/coffee-script/blob/master/lib/coffee-script/command.js#L323
There are references to path.exists in the coffeescript source code.
Note that that in node 0.6 (the current stable version) fs.exists is null so it's difficult to cleanly upgrade this.
We have an issue where the same source code doesn't work in both 0.6 and 0.7.
I would assume that we wait for 0.8 and then someone will upgrade coffeescript to use fs.exists and deprecate 0.6 support

When waiting for 0.8, on OSX you can temporary fix this issue by replacing all path.exists to fs.exists in file (if you install globally):
/opt/local/lib/node_modules/coffee-script/lib/coffee-script/command.js
Don't forget to use root access when editing.

This is a bit of a late answer, but there is a patching module meant to temporarily fix this problem until everyone has a chance to update there code.
https://github.com/SportZing/node-exists-patch

Couldn't you just change all the instances of that in the source code?

Related

iexfinance.utils.exceptions.ImmediateDeprecationError: get_available_symbols has been immediately deprecated. What's it been replaced by?

iexfinance.utils.exceptions.ImmediateDeprecationError: get_available_symbols has been immediately deprecated.
Going over some python 3.7 code and after updating some modules getting a few errors, can't seem to find the replacement for get_available_symbols from iexfinance.
I apologise for tags, can't create exact ones.
Answer, for anyone who wants to know:
iexfinance.get_available_symbols(**kwargs)
MOVED to
iexfinance.refdata.get_symbols

cannot find module node:events but node version is 16.6

My code is getting this error with using a html script using discord.js runned by electron(nodeIntergation is true and node is working in html)but I get the error: cannot find module node:events when I search it on web it says upgrade your node to 16.6 but it still don't work on 16.6
Here is the node -v command to proof
I dont't know why this is happening can someone help?
I don't know is this a good solution or gonna cause bugs but when I change some of the code in module's code it just worked(changing node:x to x just an example not real module)thanks to #Darren Cook because the thing he said in the comments make me looking to some documention on node.js and I see the modules start to calling module_name to node:module_name from some version(I guess 16.6)like I said I don't know is this a good solution but worked for me no bugs till this moment

TypeError after upgrading Node version

I'm trying to fix this problem for 6 hours now and I'm slowly starting to lose my mind, so please excuse my generic question.
First of all I am using:
Node: 8.10.0 | npm: 5.6.0 | Yarn: 1.5.1
I just upgraded my project to Node v8 and npm refused to install all dependencies, so i installed yarn which fixed the issue immediately.
My sources are compiled using Laravel Mix which utilises Webpack, Babel, ... internally.
Installing and compiling of my sources works perfectly fine now but for some reason my compiled js file is not working anymore (even if I downgrade to the previous Node version - 6.10.0).
Uncaught TypeError: fn.bind is not a function
at nativeBind (admin.js?id=8c4a6887899977ba8021:72515)
at initMethods (admin.js?id=8c4a6887899977ba8021:75849)
at initState (admin.js?id=8c4a6887899977ba8021:75617)
at Vue._init (admin.js?id=8c4a6887899977ba8021:76936)
at new Vue (admin.js?id=8c4a6887899977ba8021:77037)
at Object../resources/assets/js/admin.js (admin.js?id=8c4a6887899977ba8021:83350)
at __webpack_require__ (admin.js?id=8c4a6887899977ba8021:20)
at Object.1 (admin.js?id=8c4a6887899977ba8021:83790)
at __webpack_require__ (admin.js?id=8c4a6887899977ba8021:20)
at ./node_modules/babel-loader/lib/index.js?{"cacheDirectory":true,"presets":[["env",{"modules":false,"targets":{"browsers":["> 2%"],"uglify":true}}]],"plugins":["transform-object-rest-spread",["transform-runtime",{"polyfill":false,"helpers":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/Autocomplete.vue.Object.defineProperty.value (admin.js?id=8c4a6887899977ba8021:63)
I have aboslutely no ideas what this error means let alone what causes it.
I know that the error message is pretty generic and could probably mean a lot of things but hopefully someone knows what it means given my context.
Thanks!
#Ortomala Lokni's answer pushed me in the right direction.
For some reason I thought my problem was related to my build scripts, npm, webpack or anything of that sort, which - of course - it was not.
Event though it wasn't really an API change as he suggested there was simply a wrong call to the VueJS constructor in my JS file which, for some reason, had been ignored by a previous release of VueJs but apparently not by the current one.
For anyone experiencing some weird bugs that just don't make sense I recommend the following:
First of all: Determine what really is your problem - if it compiles it is most certainly not related to your JS build
Comment out all of your JS code in your main file
The error should be gone at this point
Narrow down the error by trying to uncomment line by line (or block by block) and test your code after each uncomment
Even though this steps might seem obvious you can easily forget about such simple thing because of the million things that could possibly break when working with modern JS.
Sometime when you upgrade libraries you have to adapt some code. As Javascript is not a typed language, the problem does't appears at compile time but at run time.
In your case, I suppose that you have a problem similar as this one.
Check which libraries yarn has upgraded and verify if some API has changed.

PHP framework AMPHP/THREAD no longer in use?

Was amphp/thread discontinued? amphp/amp is working perfectly but when I run ANY of the example coding from amphp/thread git, I get all kinds of errors. Not one example is working. I noticed last update was in 2014.
Is there any way for me to get amphp/thread working? Was it replaced? With what replacement?
I have php 7.0 installed on mac, built with thread safety. EV, EVENT, UV are all enabled.
My .jason file looks like this 
"amphp/amp": "v0.17.0", "amphp/thread": "v0.8.1"
Much appreciated.
I found the answer to this question in a discussion here:
https://github.com/amphp/thread/issues/14
amphp/thread is no longer being supported but there is hope that it will be picked up again in the future to work with amphp/amp v2. No concrete timeline on when this will happen was given.
Also, amphp/parallel is considered to be the replacement for amphp/thread.

require 'coffee-script/register' - unexpected string

I'm using coffee-script 1.7.1 (or I want to use it). Can't make it work, though.
first line of my server.coffee file is require 'coffee-script/register' and I get the oh-so familiar error SyntaxError: Unexpected string. On version 1.6.3 all was well.
In a different project I've successfully used coffee 1.7.1 when the starting file was server.js, but don't want to do it here.
Has anyone made this work? Preferably without making some sort of weird workarounds.
I'm using coffescript 1.7.1 and require 'coffee-script/register' with server.coffee.
Not sure if this applies to your situation, but I spent many hours on a similar error before I realized that I was launching my app from the wrong instance. For example, /usr/bin/coffee instead of /usr/local/bin/coffee.
which coffee gave me the correct path.
I think that you only will need to require coffee-script/register when you are writing JS and want to load a coffeescript file.

Resources