Skip to content

npm run build is broken with "Cannot read property 'stat' of undefined" #2847

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

Closed
amir20 opened this issue Oct 30, 2018 · 9 comments
Closed

Comments

@amir20
Copy link

amir20 commented Oct 30, 2018

Version

3.0.5

Reproduction link

https://gist.github.com/amir20/741117cd85858949c866e01dcf578a7f

Node and OS info

node v10.7.0, npm 6.1.0

Steps to reproduce

npm install -g @vue/cli
vue create -d hello-world
cd hello-world
npm run build

What is expected?

Successfully be able to build for production

What is actually happening?

⠙  Building for production...

 ERROR  Failed to compile with 1 errors                                                                                                                                                             3:47:08 PM

 error  in ./src/App.vue?vue&type=script&lang=js&

Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 1)
Cannot read property 'stat' of undefined

    at toDepDetails (/hello-world/node_modules/cache-loader/dist/index.js:65:14)
    at arrayIterator (/hello-world/node_modules/neo-async/async.js:3780:9)
    at timesSync (/hello-world/node_modules/neo-async/async.js:2292:7)
    at Object.mapLimit (/hello-world/node_modules/neo-async/async.js:3775:5)
    at Array.<anonymous> (/hello-world/node_modules/cache-loader/dist/index.js:88:18)
    at arrayEachFunc (/hello-world/node_modules/neo-async/async.js:2512:19)
    at Object.parallel (/hello-world/node_modules/neo-async/async.js:6867:9)
    at Object.loader (/hello-world/node_modules/cache-loader/dist/index.js:87:9)

 @ ./src/App.vue?vue&type=script&lang=js& 1:0-302 1:318-321 1:323-622 1:323-622
 @ ./src/App.vue
 @ ./src/main.js
 @ multi ./src/main.js
@pixelizedPeanut
Copy link

same here

@dezechristophe
Copy link

same with [email protected] node v11.0.0

@pixelizedPeanut
Copy link

I added a postinstall script for now in my package.json:

"scripts": {
    "postinstall": "npm i [email protected]",

it's horribly ugly but it sticked :D

@pixelizedPeanut
Copy link

webpack-contrib/cache-loader@d8c630b also this might help for tracking

@dezechristophe
Copy link

thanks ! it works

@itmayziii
Copy link

same problem

@itmayziii
Copy link

For now instead of doing a post install I would just say update your dev dependencies to use the last working version of the cache-loader which was 1.2.2

"devDependencies": {
  "cache-loader": "1.2.2"
}

moranje added a commit to moranje/meditor-one that referenced this issue Oct 30, 2018
@harishdurga
Copy link

I added a postinstall script for now in my package.json:

"scripts": {
    "postinstall": "npm i [email protected]",

it's horribly ugly but it sticked :D

I don't know what's this for, but it really solved the build error. big thanks.

@limistah
Copy link

limistah commented Nov 5, 2018

I added a postinstall script for now in my package.json:

"scripts": {
    "postinstall": "npm i [email protected]",

it's horribly ugly but it sticked :D

I don't know what's this for, but it really solved the build error. big thanks.

Read https://docs.npmjs.com/misc/scripts

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

6 participants