Coder Social home page Coder Social logo

Comments (15)

seriva avatar seriva commented on July 20, 2024

Having the same issue but regardless usage of pika in my project works fine:

"prepare": "pika-web --clean"

from snowpack.

garyo avatar garyo commented on July 20, 2024

Well, in my case it never completes, and never creates the web_modules dir, so it can't work fine. :-(

from snowpack.

FredKSchott avatar FredKSchott commented on July 20, 2024

@garyo Hey, thanks for filing. @pika/web seems to have trouble with two packages, which I actually had to blacklist from the CDN:

  • @angular/core
  • rx-compat

rx-compat just really freaks it out, I think because it circularly loads a reference to rx as common.js instead of it's normal ESM? I don't know, but until we solve the issue we should at least add a "rxjs-compat is not supported" warning message so that you have an idea of why it's hanging.

from snowpack.

ZebulanStanphill avatar ZebulanStanphill commented on July 20, 2024

I am having this same issue. Something I noticed is that rxjs is a dependency of inquirer, which in turn is a dependency of eslint.

β ‹ @pika/web installing... { Error: Cannot find module 'rxjs-compat'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/home/zeb/Coding/freeCodeCamp/zeb-fcc-basic-mathematical-calculation-device/node_modules/rxjs/Rx.js:6:10)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19) code: 'MODULE_NOT_FOUND' }
Error: You must supply options.input to rollup
    at Promise.all.then (/home/zeb/.npm/_npx/8494/lib/node_modules/@pika/web/node_modules/rollup/dist/rollup.js:16695:23)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
    at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:56:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:880:11)
    at findNodeScript.then.existing (/usr/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)
⠏ @pika/web installing... classnames, react, react-dom

(It gets stuck here indefinitely.)

from snowpack.

garyo avatar garyo commented on July 20, 2024

I think what @FredKSchott was saying above is we need to wait for a fix from him. There's no workaround currently.

from snowpack.

FredKSchott avatar FredKSchott commented on July 20, 2024

Yea sorry, this is a bug in rollup that I don't currently have the bandwidth to help fix. We can look into adding some better error messaging, and hopefully rxjs-compat is phased out over time (I believe it was only meant for rxjs v5 -> v6 migration).

from snowpack.

Elvynia avatar Elvynia commented on July 20, 2024

I'm also facing the same issue on my package (see here). It's really weird I'm using rxjs v6 and the proper imports since a while, I don't know why it still wants to install 'rxjs-compat' which is only needed to convert v5 imports.

@seriva Adding the prepare script you mentioned make my npm pack command fail : no pika-web command, is there something to install ?

Anyway I added rxjs-compat as dependency and it works now. Hope rxjs@7 is published soon and this package is definitely dropped !

-- EDIT --
I don't understand what's going on, I can use my package's pika CDN fine in a jsbin, however when I get back at the pika dev page for my package, the CDN view says :
ERROR : 'rxjs-compat not currently supported'.

What the hell it worked the first time saying 'N/A' and it is still working in my jsbin, why does it says error now ? Please @FredKSchott enlighten me :)

from snowpack.

FredKSchott avatar FredKSchott commented on July 20, 2024

From the pika link, it looks like you're list rxjs-compat as a dependency of your package. Maybe some tool is adding that for you behind the scenes?

Screen Shot 2019-08-28 at 10 00 07 AM

from snowpack.

Elvynia avatar Elvynia commented on July 20, 2024

Yes I do have the rxjs-compat dependency explicitly ! If I don't add it, I bump into the same issue stated here with "@pika/web installing... { Error: Cannot find module 'rxjs-compat'...".

I am sincerely confused because it worked with rxjs-compat package at first before saying ERROR on the CDN. The REPL function still works though.

from snowpack.

FredKSchott avatar FredKSchott commented on July 20, 2024

So I took another look at this, and I'm about to CDN build your package once the "rxjs-compat" dependency is removed. Could you try removing it and tryingΒ publishing again? FWIW I don't think it's being used by your package, so removing it shouldn't affect any users.

from snowpack.

Elvynia avatar Elvynia commented on July 20, 2024

Sure I'll do that right now and edit my post ;)
--- edit ---
Done !

from snowpack.

FredKSchott avatar FredKSchott commented on July 20, 2024

Alright, I think we're getting closer. The error now is: https://www.pika.dev/packages/@ogod/core/cdn

SyntaxError: Unexpected token (60:11) in /tmp/cdn/_WMx4FSxkiTpWNNQYBDnZ/node_modules/@ogod/core/dist/core/redux/epic.js

I think it's because of this: https://github.com/Elvynia/ogod-core/blob/master/src/core/redux/epic.ts#L232-L238 (window.process doesn't exist in node v8 (and above?) or the browser). Get rid of the "window" part of it and it should work.

if (process.env.NODE_ENV !== 'production') {
    epics.push(debugActionsEpic);
    if (process.env.NODE_ENV === 'development') {
        epics.push(debugChangesEpic);
        epics.push(debugUpdatesEpic);
    }
}

from snowpack.

Elvynia avatar Elvynia commented on July 20, 2024

I just published a new version, it's still in error I don't know if it's the same exactly. I don't understand those lines :
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
Do you ?

--- edit ---
It seems that it's just a warning, I should take care of the circular dependency and conflicting namespaces. I should try to run pika in local instead of republishing right ?

from snowpack.

FredKSchott avatar FredKSchott commented on July 20, 2024

Yea what I'll do to test locally is run @pika/web and use the path to your local distribution instead of the package name. Something like:

// package.json
"@pika/web": {
  "webDependencies": ["~/path/to/local/package"]
}
// Then run:
npx @pika/web

from snowpack.

pika-ci avatar pika-ci commented on July 20, 2024

🚚 This issue has been moved! Continue the discussion on our new package message board:
https://www.pika.dev/packages/@pika/web/discuss/1088

from snowpack.

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.