vue-loader resulting a error on webpack runtime

Created on 23 Mar 2016  Β·  17Comments  Β·  Source: vuejs/vue-loader

I use vue-cli generate a project using Object.assign when an error has occurred ..

ERROR in ./~/babel-loader?presets[]=es2015&plugins[]=transform-runtime&comments=false!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/Hello.vue
Module not found: Error: Cannot resolve module 'babel-runtime/core-js/object/assign' in /Users/Documents/project/src/components
 @ ./~/babel-loader?presets[]=es2015&plugins[]=transform-runtime&comments=false!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/Hello.vue 7:14-60

When I put vue-loader version 8.0.0 fall back to normal when you can work.

I guess this should be a question of vue-loader

node -v 4.2.1
npm -v 2.14.7

[email protected] /Users/taowei/Documents/project
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
└── [email protected]

Most helpful comment

installing 'npm install babel-runtime' or if npm3 is npm version 3.x.x than update npm.

All 17 comments

I can't reproduce this...

I'm on my computer or my company's computers are experiencing this problem。
I switched multiple versions for node and npm, are experiencing this problem

I will be in a more pristine environment to test this issue
Thank you for your reply

I try again to solve this problem, I repeat these operations on a new computer, but it is still not resolved...

At the same time I discovered a phenomenon..

i'm run npm install and npm run dev ... show this error

ERROR in ./~/babel-loader?presets[]=es2015&plugins[]=transform-runtime&comments=false!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/Hello.vue
Module not found: Error: Cannot resolve module 'babel-runtime/core-js/object/assign' in /Users/tao/testzone/test/src/components
 @ ./~/babel-loader?presets[]=es2015&plugins[]=transform-runtime&comments=false!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/Hello.vue 7:14-60

When I run npm rm vue-loader && npm install [email protected]... then do not have this problem
carry on... i run npm rm vue-loader && npm install [email protected], the same is not the problem

i guess is not what's missing some modules

OS Mac OS X
node -v 4.2.1
npm -v 2.14.7

Hmmm looks like this is because you are using npm2 so babel-runtime is not present...

Are you sure you have babel-runtime installed?

I'm sorry, I've just been doing npm3
I just updated to 8.2.2 version This issue has been resolved.
Thank you fix this problem

before I tried to use npm3... like to have this problem....

But now it has been resolved

ERROR in ./~/.6.2.5@babel-loader!./~/.9.7.0@vue-loader/lib/selector.js?type=script&index=0!./src/components/Hello.vue
Module not found: Error: Cannot resolve module 'style.css' in C:\Users\η«‹\Desktop\myapp\src\components
@ ./~/.6.2.5@babel-loader!./~/.9.7.0@vue-loader/lib/selector.js?type=script&index=0!./src/components/Hello.vue 7:0-20

help,please!! I have no idea what is wrong

how to solve your problem @taoche ?

installing 'npm install babel-runtime' or if npm3 is npm version 3.x.x than update npm.

For some reason I can't import .vue files on a completly fresh vue init webpack-simple folder.
I can run npm run dev initially, but as soon as I try to import a .vue component, this error occurrs:

./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
Module not found: Error: Can't resolve './components/Header.vue' in 'C:\laragon\www\vue-tutorials\vue-cli-tutorial\vuejs-router-vue-router\src'
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue 16:0-45
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8082 webpack/hot/dev-server ./src/main.js

@chisumo2016 , Did you get your issue solved?, I am also facing the same issue.

I also have the same problem :(

I also have the same problem :(

Folks, I also have the same problem πŸ”’

I also have the same problem with @chisumo2016

Was this page helpful?
0 / 5 - 0 ratings

Related issues

C0deZLee picture C0deZLee  Β·  3Comments

TheVexatious picture TheVexatious  Β·  3Comments

githoniel picture githoniel  Β·  3Comments

snoopdouglas picture snoopdouglas  Β·  3Comments

amorphine picture amorphine  Β·  3Comments