nodelint
nodelint copied to clipboard
TypeError: Cannot assign to read only property 'string' of (begin)
19:09 $ nodelint apps/_global/data
undefined:2557
s.string = s;
^
TypeError: Cannot assign to read only property 'string' of (begin)
at ultimate (eval at <anonymous> (/Users/kristianmandrup/npm/lib/node_modules/nodelint/nodelint:46:11), <anonymous>:2557:18)
at eval (eval at <anonymous> (/Users/kristianmandrup/npm/lib/node_modules/nodelint/nodelint:46:11), <anonymous>:3167:5)
at eval (eval at <anonymous> (/Users/kristianmandrup/npm/lib/node_modules/nodelint/nodelint:46:11), <anonymous>:6399:2)
at /Users/kristianmandrup/npm/lib/node_modules/nodelint/nodelint:46:3
at Object.<anonymous> (/Users/kristianmandrup/npm/lib/node_modules/nodelint/nodelint:194:2)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
✘-1 ~/repos/test123/repo-manager-v3 [master|✚ 3…14]
19:09 $ ls apps/_global/data
available feeds forms index.js lists menus
Same issue here (OSX).
$ npm -v
2.14.2
$ node -v
v0.12.7
Same here on ubuntu 15.04 vm
$ node --version; npm --version; uname -a; nodelint
v0.12.6
2.11.2
Linux g-virtual-machine-vivid 3.19.0-30-generic #34-Ubuntu SMP Fri Oct 2 22:08:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
undefined:2557
s.string = s;
^
TypeError: Cannot assign to read only property 'string' of (begin)
at ultimate (eval at <anonymous> (/usr/local/lib/node_modules/nodelint/nodelint:46:11), <anonymous>:2557:18)
at eval (eval at <anonymous> (/usr/local/lib/node_modules/nodelint/nodelint:46:11), <anonymous>:3167:5)
at eval (eval at <anonymous> (/usr/local/lib/node_modules/nodelint/nodelint:46:11), <anonymous>:6399:2)
at /usr/local/lib/node_modules/nodelint/nodelint:46:3
at Object.<anonymous> (/usr/local/lib/node_modules/nodelint/nodelint:194:2)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
This error seems to be happening because we are eval
ing /usr/local/lib/nodelint/jslint/jslint.js
...
s.string = s
is on line 2557. ... Why are not requiring jslint as a normal dependency instead of evaling it?
+1
+1
+1
+1
node -v v4.0.0
npm -v 2.14.2
FWIW I think the root issue is somewhere in JSLint (or some interplay with JSLint and Node). The line number 46 in the error is a red herring, since that line just evals JSLint.
Vaporware at the moment.
+1
+1
C:\Projects\pusher>jake build (node) child_process: options.customFds option is deprecated. Use options.stdio instead. evalmachine.
:2557 s.string = s; ^ TypeError: Cannot assign to read only property 'string' of (begin) at ultimate (evalmachine. :2557:18) at evalmachine. :3167:5 at evalmachine. :6399:2 at Object.exports.runInContext (vm.js:44:17) at Object. (C:\Projects\pusher\node_modules\jslint\lib\nodelint.js:9:4) at Module._compile (module.js:397:26) at Object.Module._extensions..js (module.js:404:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) jake aborted. Error: !!! JSLint FAILED. !!! at api.fail (D:\Program Files\nodejs\node_modules\jake\lib\api.js:336:18) at ChildProcess. (C:\Projects\pusher\Jakefile.js:52:7) (See full trace by running task with --trace) node -v 5.4.1
npm -v 3.5.3
+1 node -v v4.2.6
npm -v 2.14.12
I think this should be {{x.string = s;}} jslint.js:2557
I'm having the same problem and have tested with both node v4 & npm v2 and node v5 & npm v3 combinations.
+1
Can you cut a new version of this npm module with this fix?
Same here, OSX with Node 5.1.1
Same here: Node: v4.4.5 nodelint: ^0.6.2
Windows 10 x64
Same here...
npm v3.9.5 node v6.2.1
same here npm v3.10.5 node v4.4.7
+1
npm 3.10.8 node v6.8.1
+1 npm 4.1.2 node 7.5.0 macOS 10.12.3
After about 5 minutes of poking around I just commented out the line producing the error, and everything seems to work just fine now. shrug
function ultimate(s) {
var x = symbol(s, 0);
x.from = 1;
x.thru = 1;
x.line = 0;
x.edge = 'edge';
// s.string = s;
return postscript(x);
}
Hey guys,
Sorry, this project hasn't been maintained in a long time 😞 While nodelint
was great in the early days of Node.js, the world has moved on in terms of needing support for ES6+ syntax and we've not kept up.
Personally, I've been using ESLint for the last few years and it does a pretty decent job. There are also alternatives like JSHint if ESLint isn't to your liking for some reason.
Apologies for not making it clear that the project wasn't being maintained. I've now updated the repo info to mark that it's DEPRECATED.
A big thanks to those of you who did use it over the years though. Much appreciated!
— Cheers, tav
Wesome, thanks for fair suggestions.