particle-iot / docs

Documentation for Particle
https://docs.particle.io
Other
145 stars 272 forks source link

Tooling is broken on Windows #384

Open idokleinman opened 8 years ago

m-mcgowan commented 8 years ago

Not a lot to go on here, but I'm guessing it's the symlink I added for the firmware docs so they can live in their own folder and be subtree linked with the firmware repo.

Windows does support symlinks, just that git doesn't create them since they require elevated privileges.

A workaround is to create the symlink by hand in an elevated permissions command prompt:

cd src/content/reference
del firmware.md
mklink firmware.md ../../../firmware/firmware.md
idokleinman commented 8 years ago

Justin, our Windows dev pro, will post some more insight and info here

justmobilize commented 8 years ago

Here is what I get from an install:

C:\Users\JustinM\Dev\Particle\docs>npm install
npm WARN package.json metalsmith-redirect@1.3.1 No repository field.
|-

> buffertools@2.1.3 install C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\slug\node_modules\unicode\node_modules\bufferstream\node_modules\buffertools
> node-gyp rebuild

C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\slug\node_modules\unicode\node_modules\bufferstream\node_modules\buffertools>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (rebuild)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  buffertools.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled
. Specify /EHsc [C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\slug\node_modules\unicode\node_modules\bufferstream\node_mo
dules\buffertools\build\buffertools.vcxproj]
LINK : fatal error LNK1104: cannot open file 'libcpmt.lib' [C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\slug\node_module
s\unicode\node_modules\bufferstream\node_modules\buffertools\build\buffertools.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\slug\node_modules\unicode\node_modules\bufferstream\node_modules\buffertools
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

> contextify@0.1.15 install C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\jsdom\node_modules\contextify
> node-gyp rebuild

C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\jsdom\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (rebuild)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  contextify.cc
LINK : fatal error LNK1104: cannot open file 'libcpmt.lib' [C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\jsdom\node_modul
es\contextify\build\contextify.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing buffertools@2.1.3

> unicode@0.6.1 postinstall C:\Users\JustinM\Dev\Particle\docs\node_modules\metalsmith-autotoc\node_modules\slug\node_modules\unicode
> node install.js

try to read file /usr/share/unicode/UnicodeData.txt …
Warning: using slow naiv Buffer.indexOf function!
`npm install buffertools` to speed things up.
/usr/share/unicode/UnicodeData.txt not found.
try to read file /usr/share/unicode-data/UnicodeData.txt …
/usr/share/unicode-data/UnicodeData.txt not found.
try to read file UnicodeData.txt …
UnicodeData.txt not found.
try to download …
GET unicode.org:80/Public/UNIDATA/UnicodeData.txt
fetching …
.get() is deprecated. Access using array indexes instead.
saving data as Cc.js …
saving data as Zs.js …
saving data as Po.js …
saving data as Sc.js …
saving data as Ps.js …
saving data as Pe.js …
saving data as Sm.js …
saving data as Pd.js …
saving data as Nd.js …
saving data as Lu.js …
saving data as Sk.js …
saving data as Pc.js …
saving data as Ll.js …
saving data as So.js …
saving data as Lo.js …
saving data as Pi.js …
saving data as Cf.js …
saving data as No.js …
saving data as Pf.js …
saving data as Lt.js …
saving data as Lm.js …
saving data as Mn.js …
saving data as Me.js …
saving data as Mc.js …
saving data as Nl.js …
saving data as Zl.js …
saving data as Zp.js …
saving data as Cs.js …
saving data as Co.js …
done.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\JustinM\Dev\Particle\docs\npm-debug.log

C:\Users\JustinM\Dev\Particle\docs>

I'm see there are some custom settings for installing on Windows here That I'll try tomorrow.

justmobilize commented 8 years ago

This link

With this:

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade

Has got me closer

justmobilize commented 8 years ago

This is what I'm getting when I try to start the service:

C:\Users\JustinM\Dev\Particle\docs>npm start

> particle-docs@0.3.0 start C:\Users\JustinM\Dev\Particle\docs
> node ./scripts/server.js

[metalsmith-watch] ? Live reload server started on port: 35729
[TypeError: Cannot read property 'split' of undefined] 'TypeError: Cannot read property \'split\' of undefined\n    at createInPageIndexes (C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\metalsmith-lunr\\lib\\index.js:63:48)\n    at indexDocs (C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\metalsmith-lunr\\lib\\index.js:43:27)\n    at Ware.<anonymous> (C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\metalsmith-lunr\\lib\\index.js:11:5)\n    at Ware.<anonymous> (C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\wrap-fn\\index.js:45:19)\n    at next (C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\ware\\lib\\index.js:85:20)\n    at C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\wrap-fn\\index.js:121:18\n    at C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\metalsmith-autotoc\\index.js:157:7\n    at done (C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\metalsmith-autotoc\\node_modules\\async\\lib\\async.js:132:19)\n    at C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\metalsmith-autotoc\\node_modules\\async\\lib\\async.js:32:16\n    at Object.jsdom.env.done (C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\metalsmith-autotoc\\index.js:152:13)\n    at C:\\Users\\JustinM\\Dev\\Particle\\docs\\node_modules\\jsdom\\lib\\jsdom.js:245:18\n    at process._tickCallback (node.js:355:11)'

What version of node.js is required?

monkbroc commented 8 years ago

Sorry to say this isn't likely to be a simple fix. I don't think the Metalsmith static site generator and all the plugins we use are well tested on Windows.

You may want to try setting DEBUG=* as an environment variable to see which step fails.

ghost commented 8 years ago

Got the same error @justmobilize was got: image

C:\TEMP\docs-master>npm start

particle-docs@0.3.0 start C:\TEMP\docs-master
node ./scripts/server.js

[metalsmith-watch] ✓ Live reload server started on port: 35729
[TypeError: Cannot read property 'split' of undefined] 'TypeError: Cannot read property \'split\' of undefined\n    at createInPageIndexes (C:\\TEMP\\docs-master\\node_modules\\metalsmith-lunr\\lib\\index.js:63:48)\n    at indexDocs (C:\\TEMP\\docs-master\\node_modules\\metalsmith-lunr\\lib\\index.js:43:27)\n    at Ware.<anonymous> (C:\\TEMP\\docs-master\\node_modules\\metalsmith-lunr\\lib\\index.js:11:5)\n    at Ware.<anonymous> (C:\\TEMP\\docs-master\\node_modules\\metalsmith\\node_modules\\ware\\node_modules\\wrap-fn\\index.js:45:19)\n    at next (C:\\TEMP\\docs-master\\node_modules\\metalsmith\\node_modules\\ware\\lib\\index.js:85:20)\n    at C:\\TEMP\\docs-master\\node_modules\\metalsmith\\node_modules\\ware\\node_modules\\wrap-fn\\index.js:121:18\n    at C:\\TEMP\\docs-master\\node_modules\\metalsmith-autotoc\\index.js:157:7\n    at done (C:\\TEMP\\docs-master\\node_modules\\metalsmith-autotoc\\node_modules\\async\\lib\\async.js:132:19)\n    at C:\\TEMP\\docs-master\\node_modules\\metalsmith-autotoc\\node_modules\\async\\lib\\async.js:32:16\n    at Object.jsdom.env.done (C:\\TEMP\\docs-master\\node_modules\\metalsmith-autotoc\\index.js:152:13)\n    at C:\\TEMP\\docs-master\\node_modules\\metalsmith-autotoc\\node_modules\\jsdom\\lib\\jsdom.js:245:18\n    at nextTickCallbackWith0Args (node.js:420:9)\n    at process._tickCallback (node.js:349:13)'