Coder Social home page Coder Social logo

npm install fails about universal-redux HOT 6 CLOSED

bdefore avatar bdefore commented on June 27, 2024
npm install fails

from universal-redux.

Comments (6)

bdefore avatar bdefore commented on June 27, 2024

@phaneendra that's unfortunate. babel-cli should be enough to get you through for you now, but i'll make a fix later today that brings async-props module into the project source until they do another npm publish. that way babel postinstalls aren't necessary.

from universal-redux.

bdefore avatar bdefore commented on June 27, 2024

@phaneendra This should no longer be necessary as of 3.0.0-rc7. Could you please verify without babel dependencies?

from universal-redux.

phaneendra avatar phaneendra commented on June 27, 2024

Yes rc7 works with npm install - resolving the async-props issue

Now npm run dev fails with errors - I just cloned the universal-redux-starter upgraded to rc7 and ran the command, though i see the plugin babel-plugin-transform-runtime available in package.json of universal-redux.
Seems its a plugin path lookup issue - not sure how to fix this.

[1] /work/node_modules/universal-redux/node_modules/babel-core/lib/transformation/file/options/option-manager.js:193
[1]           throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
[1]           ^
[1]
[1] ReferenceError: Unknown plugin "transform-runtime" specified in "base" at 0, attempted to resolve relative to "/work/src/redux/modules"
[1]     at /work/node_modules/universal-redux/node_modules/babel-core/lib/transformation/file/options/option-manager.js:193:17
[1]     at Array.map (native)
[1]     at Function.normalisePlugins (/work/node_modules/universal-redux/node_modules/babel-core/lib/transformation/file/options/option-manager.js:173:20)
[1]     at OptionManager.mergeOptions (/work/node_modules/universal-redux/node_modules/babel-core/lib/transformation/file/options/option-manager.js:271:36)
[1]     at compile (/work/node_modules/universal-redux/node_modules/babel-core/node_modules/babel-register/lib/node.js:85:15)
[1]     at loader (/work/node_modules/universal-redux/node_modules/babel-core/node_modules/babel-register/lib/node.js:130:14)
[1]     at Object.require.extensions.(anonymous function) [as .js] (/work/node_modules/universal-redux/node_modules/babel-core/node_modules/babel-register/lib/node.js:140:7)
[1]     at Module.load (module.js:356:32)
[1]     at Function.Module._load (module.js:311:12)
[1]     at Module.require (module.js:366:17)
[1]     at require (module.js:385:17)
[1]
[1] npm
[1]  ERR!
[1]  Darwin 15.2.0
[1] npm
[1]  ERR!
[1] argv "/.nvm/v4.2.2/bin/node" "/.nvm/v4.2.2/bin/npm" "run" "dev-server"
[1] npm
[1]  ERR!
[1] node v4.2.2
[1] npm ERR! npm  v2.14.7
[1] npm ERR! code ELIFECYCLE
[1] npm
[1]  ERR!
.....
[1] npm run dev-server exited with code 1
--> Sending SIGTERM to other processes..

from universal-redux.

bdefore avatar bdefore commented on June 27, 2024

@phaneendra that's an npm issue. quick solution is to either update your npm to 3 (npm install -g npm@3) or use Node 5 which ships with it.

Because you're using Node 4.2.2's shipped version of npm (npm v2.14.7), it's not able to inspect the full dependency tree. If you want to stay with npm@2 and use universal-redux you'll need to include many of UR's dependencies as dependencies of your own project. It's too unwieldy to track what those are since I've moved on from npm 2, but it looks like in this case you'd need to at least bring all the babel stuff over.

I strongly recommend going with npm3. It can be a bit slower, but you'll probably run into this issue with other libraries as well. With the --cache-min=1000000 flag it's about the same speed as npm2 with only edge case risks.

from universal-redux.

phaneendra avatar phaneendra commented on June 27, 2024

upgrading to npm 3 and it flat module resolution did the trick, I feel explicitly depending on universal redux dependencies defeats the purpose of why this module was converted to npm module.

from universal-redux.

bdefore avatar bdefore commented on June 27, 2024

@phaneendra agreed. i've decided to make npm3 a requirement now. it will provide a warning on npm install otherwise.

from universal-redux.

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.