Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'npm install' not installing dependency #4

Open
masonoise opened this issue Nov 13, 2017 · 3 comments
Open

'npm install' not installing dependency #4

masonoise opened this issue Nov 13, 2017 · 3 comments

Comments

@masonoise
Copy link

Just a quick note that after following the docs to do "vue-init", then "npm install", running "npm run dev" had an error:

 ERROR  Failed to compile with 1 errors                                                                       6:16:37 PM

This dependency was not found:

* element-ui/lib/theme-chalk/index.css in ./src/js/main.js

To install it, you can run: npm install --save element-ui/lib/theme-chalk/index.css

...and...

ERROR in ./src/js/main.js

  ✘  https://google.com/#q=import%2Fno-unresolved  Unable to resolve path to module 'element-ui/lib/theme-chalk/index.css'
  src/js/main.js:4:8
  import 'element-ui/lib/theme-chalk/index.css';
          ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=import%2Fno-unresolved
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/js/main.js

ERROR in ./src/js/main.js
Module not found: Error: Can't resolve 'element-ui/lib/theme-chalk/index.css' in '/Users/mason/workspace/creator-hub/src/js'
 @ ./src/js/main.js 4:0-46
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/js/main.js
Child html-webpack-plugin for "index.html":
     1 asset
       [0] ./node_modules/html-webpack-plugin/lib/loader.js!./index.html 667 bytes {0} [built]
       [1] ./node_modules/lodash/lodash.js 540 kB {0} [built]
       [2] (webpack)/buildin/global.js 488 bytes {0} [built]
       [3] (webpack)/buildin/module.js 495 bytes {0} [built]

Just to keep moving along I tried doing the npm install of that css, but it reports:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "element-ui/lib/theme-chalk/index.css" as it does not contain a package.json file.

I'll comment again if I have a chance to dig in and see what's up, but I wanted to let you know. Thanks.

@masonoise
Copy link
Author

Got it, I changed the element-ui spec in package.json to "^2.0.4" and it seems to be working. Looks like there was an issue in an earlier 1.x that got pulled in? Not sure really, as I don't know anything about Element (yet), but it did compile and load; so far, so good. Thanks!

@rohitkrai03
Copy link
Owner

I have fixed the issue now and its working. Please check PR

@masonoise
Copy link
Author

Thanks! Interesting though, after updating to use "^2.0.4" it works with chalk, but not with the default that's in your PR. I'll look into it a bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants