Coder Social home page Coder Social logo

Comments (12)

joeytwiddle avatar joeytwiddle commented on August 20, 2024 1

I tried on my MacBookPro and got the same errors! (--unsafe-perm also the same.)

So I would urge you to keep good backups of your node_modules folder etc., because there might be something magical happening on your machine! πŸ˜‰

The same bug has been reported on the cross-var repo, but no solutions yet.

I tried a couple of fixes, but still can't get past the {loose: true} error.

(For example, adding babel-plugin-transform-runtime to our package.json does get past the first error message, although I do appreciate that should not be the responsibility of this app! An alternative is to move it from devDependencies into dependencies in cross-var's package.json, and then do a similar fix for babel-plugin-transform-flow-strip-types in babylon's devDependencies. For some reason npm isn't pulling in the devDependencies of child modules even when I try --dev and NODE_ENV=development.)

I notice you are pinned to cross-var=1.0.3. I tried with the latest 1.1.0 but there was no improvement.

Babylon uses cross-env which appears to be very popular (>900 dependents), so that might be an alternative worth trying in future.

from app.

joeytwiddle avatar joeytwiddle commented on August 20, 2024 1

I will have a try, so that you can get back to the Firefox addon. 😎

from app.

nero120 avatar nero120 commented on August 20, 2024 1

@joeytwiddle I believe this issue has been resolved with the most recent commit. I've tested on an Ubuntu box with the following specs:

  • Ubuntu 16.04.4 LTS
  • Node v9.10.1
  • NPM v6.0.0

If you get a chance could you clone the most recent v1.4.0 to a new dir, then run npm install and npm run build:chrome and see if you get any errors?

I'm going to close this for now, I'll re-open if you still have problems after the latest commit.

If you do get around to creating a pull request to switch from using cross-var to cross-env that would be great, otherwise I'll add it to my list of dependencies to evaluate after v1.4.0 has been released. πŸ˜„

from app.

joeytwiddle avatar joeytwiddle commented on August 20, 2024 1

Out of interest, I tried with node v8.9.3 and npm v5.4.0. The installation and the build passed with no warnings or errors!

The build took 17 seconds, outputting 52 files.

Thanks for this nero120. The ability to compile it makes it much more likely that I will contribute in future!

from app.

nero120 avatar nero120 commented on August 20, 2024

Unfortunately there wasn't a package-lock.json for the current version, it's something I'm currently addressing. Those errors you're getting are from dependencies as xBrowserSync doesn't directly depend on babel, nor use prepublish scripts.

I'll have these dependency issues resolved when I release the next version, which will include a package-lock.json. Apologies for the trouble!

(btw, the build should work both on Windows and Linux as I use both platforms)

from app.

joeytwiddle avatar joeytwiddle commented on August 20, 2024

Alright, good to know. I will do some googling and see if others have met this same error.

from app.

nero120 avatar nero120 commented on August 20, 2024

Just ran the following on my windows box:

npm install
npm run build:chrome

and the build ran successfully. Could be a linux issue, try running npm install --unsafe-perm then re-run the build.

from app.

nero120 avatar nero120 commented on August 20, 2024

Great work @joeytwiddle! Are you up for replacing cross-var with cross-env and submitting a pull request? I've switched the default branch to v1.4.0, would you be able to switch to this branch and then submit the change, if so I can test the change on my Windows machine and then incorporate it with the upcoming release.

from app.

joeytwiddle avatar joeytwiddle commented on August 20, 2024

Oh, I think I know why these packages can't find their dependencies.

It's because I am using the latest versions of npm and yarn, which flatten the module tree.

I suspect these packages are trying to load things specifically from deep node_modules folders, e.g. doing require('../node_modules/' + pluginName) instead of just require(pluginName). That would have worked before flattening.

If there is no way to disable flattening in npm/yarn, I will try an older version of npm. (You never did tell me what version you are using, but I'm guessing it's not recent!)

It would be good to document in the README what is the recommended development environment (node and npm versions).

(I like using nvm to have different versions of node installed on Linux/Mac.)

from app.

nero120 avatar nero120 commented on August 20, 2024

Hmm, I'm actually on Node LTS (v8.11.1) and npm v6.1.0 and I'm not having this issue, I need to give it a try on my laptop running Ubuntu. Since it is working on Windows with latest npm I would suspect it is more of a package issue as you previously mentioned rather than an inherent npm issue?

from app.

nero120 avatar nero120 commented on August 20, 2024

I decided to just do the replacement as it was quick enough, in 8c701c1.

from app.

nero120 avatar nero120 commented on August 20, 2024

Great stuff @joeytwiddle, thanks for testing it!

from app.

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.