Giter Site home page Giter Site logo

v1.3.0 fails on require about cuid HOT 33 CLOSED

paralleldrive avatar paralleldrive commented on July 25, 2024
v1.3.0 fails on require

from cuid.

Comments (33)

jxson avatar jxson commented on July 25, 2024

This is a problem for me as well, the build folder is missing for [email protected]

Note: I caught this via CI I am sure lots of people are having this issue...

from cuid.

nikuda avatar nikuda commented on July 25, 2024

Same problem. "main" is pointing to a non-existent file so you can't require cuid at all since 1.3.0.

from cuid.

crabmusket avatar crabmusket commented on July 25, 2024

Another one here.

from cuid.

mmckegg avatar mmckegg commented on July 25, 2024

📣

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

As @mmckegg has demonstrated, the temporary fix is to peg cuid @ 1.2.4 in your package.json dependencies list:

"cuid": "1.2.4"

I'm working on a more permanent fix right now. Sorry for the trouble! =)

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

If anybody can beat me to it, I'm happy to take a PR, too. I'll watch this thread while I'm working.

from cuid.

nikuda avatar nikuda commented on July 25, 2024

Thanks @ericelliott. v1.2.5 works as well for what's it worth.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

Yeah. Looks like I forgot to check that the build was configured properly. My bad. Sorry everybody. Fix landing soon. =)

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

Cool.. looks like the new build also breaks the API. Fixing that, too. Almost done folks! =)

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

Just figuring out the browser tests, now.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

This is why you shouldn't try to code when you're sleep deprived. The long string of published updates was me trying to fix this problem when I should have been sleeping. I'm giving up for tonight.

In the meantime, I've rolled back the build outputs to the previous known working version.

In the interest of not breaking 100 projects again, I'll keep those known working versions there until I'm confident that the new build is working properly (complete with CI checks).

If anybody wants to take a crack at getting the new build to work, you're welcome to. I'm trying to use Zuul to automate cross browser tests on Sauce Labs so we can be more confident about future changes. That's not working for me... The browser sessions work, but it doesn't seem to see any test results.

😴

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

fyi, old (good) builds are in ./dist. New (broken) builds are in ./build. Have fun. =)

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

ping @therealklanni

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

Broken build error:

$ node
> var cuid = require('./node_modules/cuid/build/server-cuid.js');
TypeError: Cannot read property 'toString' of undefined
    at Object.<anonymous> (/Users/eric/Dropbox/dev/tmp/node_modules/cuid/build/server-cuid.js:161:27)
    at Object.module.exports (/Users/eric/Dropbox/dev/tmp/node_modules/cuid/build/server-cuid.js:177:31)
    at __webpack_require__ (/Users/eric/Dropbox/dev/tmp/node_modules/cuid/build/server-cuid.js:20:30)
    at Object.defineProperty.value (/Users/eric/Dropbox/dev/tmp/node_modules/cuid/build/server-cuid.js:59:20)
    at __webpack_require__ (/Users/eric/Dropbox/dev/tmp/node_modules/cuid/build/server-cuid.js:20:30)
    at Object.defineProperty.value (/Users/eric/Dropbox/dev/tmp/node_modules/cuid/build/server-cuid.js:40:18)
    at Object.<anonymous> (/Users/eric/Dropbox/dev/tmp/node_modules/cuid/build/server-cuid.js:43:10)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

from cuid.

jxson avatar jxson commented on July 25, 2024

@ericelliott thanks for rolling back, [email protected] is working for my browserify builds now.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

👍

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

I'll need to check what changed between 1.2.x and 1.3.0. Will be all over this tonight.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

@therealklanni What changed is that I published the modernization / modularization changes without double checking that all the testing was ready to go. There were no client-side tests at all, and I wasn't able to get the server-side import to work, either last night. I made some changes last night you may want to look at. Maybe you'll have better luck understanding what's going wrong with the builds.

But this much is clear after the mess yesterday: We need to be testing the build results, not just the source modules. =)

I'm going to insist that we keep the build in source control, too. I like the comfort of knowing there's always a known working build people can download from the repo.

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

@ericelliott I'm looking into it now. It appears the browser tests just hang forever. Looking into it further it appears the sauceReporter.js was not being imported, so I've tried importing that and passing tape to it, however it still appears to be hanging. Will update you when I know more.

Agreed, we should test the build.

I didn't realize we weren't committing the builds, we definitely should be.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

I'm looking into it now. It appears the browser tests just hang forever. Looking into it further it appears the sauceReporter.js was not being imported, so I've tried importing that and passing tape to it, however it still appears to be hanging. Will update you when I know more.

It shouldn't be required with Zuul... Zuul's whole thing is "we do this sauce connection/reporting stuff for you."

sauceReporter was my backup plan if we can't get Zuul to work. We'll need to report manually with the REST API if we can't get it working. :)

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

@ericelliott OK, well maybe that wasn't the problem. In any case, I moved on to looking into the build issue.

I just figured out (part of) the issue with the server build at least. The webpack config wasn't specifying the library or libraryTarget. Adding those for the final case of the ternary there fixed at least part of the issue. Doing a little more digging now.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

BTW, if we do have to use the sauceReporter, we have to add an extra test at the end called 'complete' to trigger the second condition. I couldn't figure out any other way to know when all the tests are finished. :| See source.

There must be a way if zuul ever worked for anybody, but I didn't find it last night.

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

Looks like I resolved the issue with the server build at least. Need to publish a fix to node-fingerprint and then I'll PR the cuid server build fix.

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

@ericelliott However, we have another issue with testing the build instead of the unbuilt code. When Webpack builds the source, the process.pid property doesn't exist when running the code. I have a workaround for that, but maybe there's a better (more correct) way to resolve this?

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

@ericelliott we have a good server build now, pending your review. I'll move on to working on the client build next.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

Anybody else want to download the latest and give it a test? This isn't published on npm yet, so you'll need to wire it up manually.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

@therealklanni What's the next step?

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

@ericelliott I think I was working on the client build, but I've been getting pulled in other directions. I'll check to see where I was at with that.

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

=)

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

Sorry, haven't gotten around to it yet. It's the last 2 weeks of the bootcamp, so my students need my full attention, and trying to plan Thanksgiving 😩 ... I haven't forgotten about it, though.

from cuid.

therealklanni avatar therealklanni commented on July 25, 2024

Looks like all that needs to be done is to write browser tests for browser-fingerprint

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

ping @therealklanni

from cuid.

ericelliott avatar ericelliott commented on July 25, 2024

Should be fixed. Reopen if you still have trouble.

from cuid.

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.