GithubHelp home page GithubHelp logo

Comments (14)

Zaid-Ajaj avatar Zaid-Ajaj commented on May 30, 2024 1

@ScottHutchinson Thats settles it then, happy that you got it working! Please let me know if you find bugs or if you have suggestions for improvements. As for the url, I have added it in the Readme this should do it for now 😄

from tabula-rasa.

Zaid-Ajaj avatar Zaid-Ajaj commented on May 30, 2024

Hi there @ScottHutchinson, I will add a build.cmd file tomorrow, if you want to try it out right away, install git for windows (that's what I use) and go ./build.sh Watch to get started

from tabula-rasa.

ScottHutchinson avatar ScottHutchinson commented on May 30, 2024

Thanks. I have git for windows, but was not sure I could use git bash for this purpose. So far I mostly use it just for git commands. It didn't quite work. See errors below.

ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./sass/app.sass
Module build failed: Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (c:\Users\scott\source\repos\tabula-rasa\Client\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (module.js:652:30)
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)
@ ./sass/app.sass 4:14-115 18:2-22:4 19:20-121
@ ./src/Program.fs
@ ./src/TabulaRasa.Client.fsproj
@ multi (webpack)-dev-server/client?http://localhost:8090 webpack/hot/dev-server ./src/TabulaRasa.Client.fsproj

ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./sass/spinner.css
Module build failed: Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (c:\Users\scott\source\repos\tabula-rasa\Client\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (module.js:652:30)
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)
@ ./sass/spinner.css 4:14-118 18:2-22:4 19:20-124
@ ./src/Program.fs
@ ./src/TabulaRasa.Client.fsproj
@ multi (webpack)-dev-server/client?http://localhost:8090 webpack/hot/dev-server ./src/TabulaRasa.Client.fsproj

ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./node_modules/toastr/build/toastr.min.css
Module build failed: Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (c:\Users\scott\source\repos\tabula-rasa\Client\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (module.js:652:30)
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)
@ ./node_modules/toastr/build/toastr.min.css 4:14-101 18:2-22:4 19:20-107
@ ./src/Elmish.Toastr.fs
@ ./src/App/State.fs
@ ./src/Program.fs
@ ./src/TabulaRasa.Client.fsproj
@ multi (webpack)-dev-server/client?http://localhost:8090 webpack/hot/dev-server ./src/TabulaRasa.Client.fsproj

ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./node_modules/react-select/dist/react-select.css
Module build failed: Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (c:\Users\scott\source\repos\tabula-rasa\Client\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (module.js:652:30)
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)
@ ./node_modules/react-select/dist/react-select.css 4:14-103 18:2-22:4 19:20-109
@ ./src/Components/React.Select.fs
@ ./src/App/Admin/Backoffice/EditArticle/View.fs
@ ./src/App/Admin/Backoffice/View.fs
@ ./src/App/Admin/View.fs
@ ./src/App/View.fs
@ ./src/Program.fs
@ ./src/TabulaRasa.Client.fsproj
@ multi (webpack)-dev-server/client?http://localhost:8090 webpack/hot/dev-server ./src/TabulaRasa.Client.fsproj
webpack: Failed to compile.

from tabula-rasa.

Zaid-Ajaj avatar Zaid-Ajaj commented on May 30, 2024

Yeah I have had something similar before, it was that npm is pulling node-sass from sources and is trying is trying to build it from scratch, I solved it by removing package-lock.json and re-run the build to let it know that I am on windows and that I would rather have the pre-compiled binaries. Although I don't think this is the best way to do it (maybe @MangelMaxime knows something about this?)

In any case, I just added build.cmd to the repo, can you try pull latest master and run build.cmd Watch again?

from tabula-rasa.

MangelMaxime avatar MangelMaxime commented on May 30, 2024

Hum, I don't know. In general, I use yarn instead of npm and I never had this kind of problem.

But, I don't see why this should work better with yarn..

from tabula-rasa.

ScottHutchinson avatar ScottHutchinson commented on May 30, 2024

So build.cmd yielded a similar result. I guess I will need to delete package-lock.json then.

from tabula-rasa.

ScottHutchinson avatar ScottHutchinson commented on May 30, 2024

I do have yarn, if you want me to try that. I might need instructions though.

from tabula-rasa.

Zaid-Ajaj avatar Zaid-Ajaj commented on May 30, 2024

If you want to try yarn, you can replace this line let npm = "npm" with let npm = "yarn" inside build.fsx although that is just for testing, I will work on making this process simpler tomorrow

from tabula-rasa.

ScottHutchinson avatar ScottHutchinson commented on May 30, 2024

let npm = "yarn" did not improve it. And neither did deleting package-lock.json. Here are the errors:

https://gist.github.com/ScottHutchinson/b89437e6d4334d9cf836c112262f1728#file-gistfile1-txt-L203

from tabula-rasa.

ScottHutchinson avatar ScottHutchinson commented on May 30, 2024

Ah...there are multiple package-lock.json files. Do I need to delete them all, or just a particular one?

from tabula-rasa.

Zaid-Ajaj avatar Zaid-Ajaj commented on May 30, 2024

Hi @ScottHutchinson It seems I was missing the node-sass dependency itself, I have fixed it now, a fresh clone from github should run smoothly now, can you please try it now?

git clone https://github.com/Zaid-Ajaj/tabula-rasa.git 
cd tabula-rasa
build.cmd Watch

from tabula-rasa.

ScottHutchinson avatar ScottHutchinson commented on May 30, 2024

Much better:

webpack: Compiled successfully.
http://localhost:8090/
There aren't any stories published yet

Maybe you could add a Run target like the SAFE-Dojo that starts the browser automatically:
https://github.com/CompositionalIT/SAFE-Dojo/blob/master/build.fsx#L69

from tabula-rasa.

MangelMaxime avatar MangelMaxime commented on May 30, 2024

In general, I don't really like the auto open feature personally because you can end up with a lot of tabs or just closing it because you already have one opened.

But if someone want to add auto open browser, I would encourage using webpack open option in the devServer instead. The 5 seconds delay being totally random. And I don't think a "medium" project take less than 5 second to build so we could open the browser directly.

I didn't test the option, but in theory if webpack server has been started the browser will wait after it for the compilation process to be finished. So it should not display a "Server not found" error.

from tabula-rasa.

ScottHutchinson avatar ScottHutchinson commented on May 30, 2024

The auto open feature would probably not be needed, if the url/port number was a bit more easily discoverable. In the FAKE terminal output below, there was no coloration to distinguish the url, so it blended in with the other text. The url could be made more obvious in the output, as well as in the readme.md file. It just helps to smooth the entry path for newbies like me.

[./src/Program.fs] ./src/Program.fs 4.35 kB {0} [built]
[0] multi (webpack)-dev-server/client?http://localhost:8090 webpack/hot/dev-server ./src/TabulaRasa.Client.fsproj 52 bytes {0} [built]
[./src/TabulaRasa.Client.fsproj] ./src/TabulaRasa.Client.fsproj 29 bytes {0} [built]
+ 639 hidden modules
webpack: Compiled successfully.

from tabula-rasa.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.