Giter VIP home page Giter VIP logo

Comments (10)

queengooborg avatar queengooborg commented on August 20, 2024

Sorry about that! I didn't consider the local installation for testing when migrating to Webpack. I would say that the following command should do the trick:

npx install-local ~/path/to/bob && npm explore mdn-bob -- npm run build

from bob.

NiedziolkaMichal avatar NiedziolkaMichal commented on August 20, 2024

This throws following error: Error during build: Error: ENOENT: no such file or directory, lstat './live-examples/media', while the full path is for me C:\Repo\mdn\interactive-examples\node_modules\mdn-bob\lib\. I think I can make it working with simple npm install inside interactive-examples repository, but while doing that I discovered another problem. Build script inside interactive-examples is simply "build": "mdn-bob". It doesn't trigger webpack, so css & js directories are missing from built interactive-examples and I think they will cease working when BOB gets updated.

from bob.

queengooborg avatar queengooborg commented on August 20, 2024

image

The build script is definitely not just mdn-bob -- if I remember correctly, I think that install-local has some weird caching issues and doesn't override the existing installation. I'd try removing the node_modules/mdn-bob folder and try again.

from bob.

NiedziolkaMichal avatar NiedziolkaMichal commented on August 20, 2024

I am talking about the one in interactive examples package.
image

from bob.

queengooborg avatar queengooborg commented on August 20, 2024

Ahh, hmm... Does the above command I suggested, npm explore mdn-bob -- npm run build, work there too?

from bob.

NiedziolkaMichal avatar NiedziolkaMichal commented on August 20, 2024

It works, but all file dependencies are missing:
image

They can be found in node_modules/mdn-bob, but webpack is not run, so they are not attached to rest of the built files.

from bob.

queengooborg avatar queengooborg commented on August 20, 2024

Can you double-check the node_modules/mdn-bob folder and make sure it's up to date? That above command should CD into the folder and run the build command from there, which includes running Webpack.

from bob.

rubiesonthesky avatar rubiesonthesky commented on August 20, 2024

I had problems running some scripts locally with node 18 but with node 16 it worked. May be worth trying?

from bob.

NiedziolkaMichal avatar NiedziolkaMichal commented on August 20, 2024

I have installed interactive-examples from scratch, then run npm install. Now BOB 2.2.0 is used, so npm run install built everything correctly with outdated BOB.

Now I run npx install-local ../bob && npm explore mdn-bob -- npm run build which successfully replaced whole content of node_modules/mdn-bob with new files, but it throws exception Error: ENOENT: no such file or directory, lstat './live-examples/media'. Using npm explore mdn-bob -- npm run build at this point also throws the same exception.

Using npm run build overrides local version of BOB with version from the repository and builds pages using old bob version.

Now I run npm install --save ../bob which replaces "mdn-bob" in "devDependencies" to "file:../bob" and updates node_modules/mdn-bob to newest version. npm run build in interactive-examples just builds the pages, without running webpack and css & js directories are missing in docs.
npm explore mdn-bob -- npm run build run from interactive-examples is simply building BOB + BOB pages + Runs Webpack and makes all of them be stored in node_modules\mdn-bob\docs.

Being able to use interactive-examples with local version of bob is not really that important to me. Could you please just make sure that interactive-examples repo will work successfully after BOB gets updated with all recent changes?

from bob.

queengooborg avatar queengooborg commented on August 20, 2024

I've just opened up #925 to embed the Webpack run directly into the existing script, which will fix this whole issue!

from bob.

Related Issues (20)

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.