Comments (6)
The problem is with cyclic.js and the existsSync function on line 1. Which is not available before node v0.8 (was path.existsSync)
The Watchr library is depending on "typechecker": "~2.0.1", which is now broken on node v0.6.
The change to fs.existsSync is breaking other dependencies at the moment.
Here is a solution for making cyclic.js work again with older versions of node.
try {
if (require('fs').lstatSync('.git')) {
require('child_process').spawn(
'npm',
['install', '--force', require('./package.json').name],
{env: process.env, cwd: process.cwd(), stdio: 'inherit'}
);
}
} catch (err) {
return err;
}
So the problem can be solved by using lstatSync with a try/catch around it. Easy!
I tried path.existsSync
as well, but node > 0.6 prints the following warning. (not recommend)
path.existsSync is now called `fs.existsSync`.
Any chance you can fix this minor compatibility issue? Thanks!
from typechecker.
+1. Facing the same issue. Would be good to get this compatibility fixed.
from typechecker.
What is the purpose of this file cyclic.js, and why has it found its way into so many projects?
from typechecker.
@amb26 if project A has a development dependency called project B that has a dependency of project A, then that creates a cyclic dependency, which npm will error about, cyclic.js fixes that error.
I'm unsure if newer versions of npm still have this issue.
from typechecker.
cyclic.js
is maintained by the bevry/base project, https://github.com/bevry/base/blob/master/cyclic.js
TypeChecker will be updated in coming months when it is converted along with our over projects to ES6, and will get this update - details. As it seems this update is only for Node 0.6 from 2013, I don't think this of any urgency.
from typechecker.
Removed cyclic.js
in v2.1.0, seems npm now handles cyclic dependencies correctly.
from typechecker.
Related Issues (18)
- Strange log "export function getObjectType" from source/index.js:17 HOT 4
- IE11 compatibility problem HOT 1
- typeChecker.isPlainObject() return non boolean value HOT 2
- Pre-installations exits with non-zero status in 2.0.8 HOT 4
- Add docs to npmignore HOT 3
- adding a custom type, typeMap is frozen HOT 8
- async functions not recognized as functions by isFunction HOT 5
- Usage within angular6 HOT 2
- Generator Functions HOT 4
- add isSymbol
- Add support for Set
- the lib/typechecker.js isEmpty function is look like this... HOT 2
- Your .dependabot/config.yml contained invalid details HOT 1
- broke between 4.7 and 4.11, no default export HOT 1
- Add isClass value check HOT 1
- Your .dependabot/config.yml contained invalid details HOT 1
- Add YUIDocs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typechecker.