My first guess would be ignorance on my part , I 'm not at all familiar with javascript and I expect I didn’t do something it needed. I’ll try running the tests and see what happens. What kind of a result should I be expecting? From the hello world example I found I expect it to launch a server on a socket and then give me something (I don’t really know what ) when I connect to the server from a web browser. Does that sound reasonable or does it do something else? I just tried the new issues link and after I signed in to github it came up, but I haven’t tried to submit an issue yet. In a bit I’ll try the web page and open an issue if it still 404s (or I can open a test issue to see if it works for me if you like).
Edit: Yes, it looks like operator error (or bad environment). I’m trying this on Windows 7pro and on the git dos command prompt it tells me I don’t have make (which is probably true) so I switched to cygwin where “make test” says:
“make: node_modules.bin\jest: Command not found”
which may be because I haven’t actually built nodejs on cygwin (a quick look indicates it has problems running there). I’ll continue poking at it so that I hopefully learn (and can document for others) how to do it. At worst I can move to the Ubuntu system that I have for Fritzing development and try it there.
edit2: I just had another try on Windows7: from a git cmd window (because it needs git):
C:\Users\Owner\fritzing-parts-api-client-js>yarn add fritzing/fritzing-parts-api
-client-js
yarn add v1.5.1
warning …\package.json: No license field
[1/4] Resolving packages…
[2/4] Fetching packages…
info fsevents@1.1.3: The platform “win32” is incompatible with this module.
info “fsevents@1.1.3” is an optional dependency and failed compatibility check.
Excluding it from installation.
[3/4] Linking dependencies…
[4/4] Building fresh packages…
success Saved lockfile.
success Saved 6 new dependencies.
info Direct dependencies
├─ babel-plugin-minify-dead-code-elimination@0.3.0
└─ fritzing-parts-api-client-js@0.2.0
info All dependencies
├─ babel-helper-evaluate-path@0.3.0
├─ babel-helper-mark-eval-scopes@0.3.0
├─ babel-helper-remove-or-void@0.3.0
├─ babel-plugin-minify-dead-code-elimination@0.3.0
├─ fritzing-parts-api-client-js@0.2.0
└─ lodash.some@4.6.0
Done in 68.97s.
C:\Users\Owner\fritzing-parts-api-client-js>node fritzing.js
module.js:549
throw err;
^
Error: Cannot find module 'C:\Users\Owner\fritzing-parts-api-client-js\fritzing.
js’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
C:\Users\Owner\fritzing-parts-api-client-js>
where fritzing.js is the code from the readme file:
C:\Users\Owner>type fritzing.js
import {FritzingPartsAPIClient} from ‘fritzing-parts-api-client-js’
FritzingPartsAPIClient.getFzps()
.then((fzpz) => {
console.log(fzps)
})
.catch((err) => {
console.error(err)
})
C:\Users\Owner>node fritzing.js
C:\Users\Owner\fritzing.js:1
(function (exports, require, module, __filename, __dirname) { import {FritzingPa
rtsAPIClient} from ‘fritzing-parts-api-client-js’
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
This of course may not be how I’m supposed to run it …
Peter