Open ionutanton opened 8 years ago
sass and jade need to be installed globally as far as i can tell from here:
'sass' is not recognized as an internal or external command, operable program or batch file.
sass might be tricky on win - you might need to get ruby. check install instructions here. or try npm install -g node-sass
I'm not sure why jade is running into troubles - permissions maybe?
Error: ENOENT: no such file or directory, lstat 'D:\Documente\Documents\GitHub\future.speckle\spkw\src\jade\*.jade'
if the path looks correct then it might be that.
damn windoz.
reading more properly your question: you don't need to start the viewer, he should be fine as is;
some q:
so, i did install ruby and globaly install node-sass and jade. now the watch-sass works, watch-js works, but watch-jade does not. same error on jade as above. to answer the questions above:
Also i tried installing a ubuntu virtual box and installing everything propperly. running the npm run watch works, launches the webserver, i can authenticate, but same problem with upload. unfortunately on linux nouislider does not install with npm.
does the path to where jade wants to look at files exist? ('D:\Documente\Documents\GitHub\future.speckle\spkw\src\jade\*.jade'
)
path is ok and files are there.
future.speckle
tried the removing the dot, but doesn't work.
made some progress. made jade to work, and nodemon and sass. need to install globaly: browserify, jade, node-sass. need to install ruby for sass as stated above.
Then a few tricks for the package.json to work on windows.
something like this:
"scripts": { "watch-sass": "sass --watch spkw/src/sass/SPKSingle.scss:spkw/dist/css/SPKSingle.css spkw/src/sass/SPKDouble.scss:spkw/dist/css/SPKDouble.css", "watch-jade": "jade --watch spkw/src/jade/ -o spkw/dist/ -P", "build-js-single": "browserify spkw/src/js/SPKSingle.js -o spkw/dist/js/SPKSingle.js", "build-js-double": "browserify spkw/src/js/SPKDouble.js -o spkw/dist/js/SPKDouble.js", "watch-js": "nodemon -e js -w spkw/src/js -x \"npm run build-js-single\" & nodemon -e js -w spkw/src/js -x \"npm run build-js-double\"", "watch-remote": "npm run watch-sass & npm run watch-jade & npm run watch-js", "watch": "npm run watch-remote & nodemon server.js --ignore 'uploads'", "watch-simple": "nodemon server.js --ignore 'uploads' --ignore 'spkw'"
now i can run all the scripts without any errors.
but my problem persists. i cant upload new models. when i upload the console sais: upload is done, waiting for the server side processing and the running npm has a POST line: POST /api/uploads/ 200 214ms i actualy added some lines to the upload script to see if the server realy gets there. added some console.log("something"); the the app.post function. but the npm window doesnt register anything. where should i look for these console messages?
Sorry I didn't have time to check up on this. I'll be a bit more free after Wednesday to get back to dev and debug.
destination : function( req, file, cb ) { cb( null, './uploads' )},
that bit - might be that windoz treats paths differently. Should use a more proper way, using path.join()
. see here the docs. should be something like path.join(appDir, 'uploads')
i think. DecompressZip
might fuck up, though in this case you should still see a file appearing in ./uploads
fs.unlink()
might fuck up - though this happens regularly and should not critically crash the appjust a small update. i saw an error in the console when i run the server. it's related to bson: { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } and bson comes with mongoose this time. The error is in the busboy middleware that leads to multer. js-bson: Failed to load c++ bson extension, using pure JS version. body-parser deprecated bodyParser: use individual json/urlencoded middlewares at server.js:31:9.
Seems like bson needs a c++ compiler to run. Will keep digging and keep posted.
PS: changing multer to something else will have the same result i guess. PS2: its deffinetly a windows thing.
Strike last post. solved the bson problem. it's not that.
tried changing multer to formidable, same result. at some point i get an error from uploader, or it doesn't manage to write the file or something.
Solved.
please change the name of the file in modelmanager.js
function getName ( req ) { return Date.now() + '-' + req.user.id.replace("|",".") + '-' + shortid.generate(); }
Actualy windows cant handle '|' in filenames.
Reopened as bug!
I tried installing my own server on a Windows 10 box. managed to get auth0 and a local mangodb running. started the main server with npm run watch-simple and the skpw with npm run watch-remote the remote on spkw does not work propperly, it outpus a lot of errors. error_160221.txt
Well, the server runs, i can use auth0 and i get to my dashboard. but when i try to upload, the file is uploaded and then nothing happens. and there is no output in the npm console for future.speckle.
Thank you