profile
viewpoint

Ask questionsnpm install error 1.2.11

@vue/cli 4.1.1 node v12.13.1 npm 6.13.4 macOS 10.15.2

% vue add electron-builder

📦  Installing vue-cli-plugin-electron-builder...


> fsevents@1.2.11 install /Users/sheng/electron/vue-cli-plugin-electron-builder/node_modules/watchpack/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
#       error Never include this file directly. Use <lzma.h> instead.
        ^
/usr/local/include/Block.h:93:2: error: unknown type name 'lzma_check'
        lzma_check check;
        ^
/usr/local/include/Block.h:148:2: error: unknown type name 'lzma_vli'
        lzma_vli compressed_size;
        ^
/usr/local/include/Block.h:172:2: error: unknown type name 'lzma_vli'
        lzma_vli uncompressed_size;
        ^
/usr/local/include/Block.h:200:2: error: unknown type name 'lzma_filter'
        lzma_filter *filters;
        ^
/usr/local/include/Block.h:217:20: error: use of undeclared identifier 'LZMA_CHECK_SIZE_MAX'
        uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
                          ^
/usr/local/include/Block.h:231:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int3;
        ^
/usr/local/include/Block.h:232:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int4;
        ^
/usr/local/include/Block.h:233:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int5;
        ^
/usr/local/include/Block.h:234:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int6;
        ^
/usr/local/include/Block.h:235:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int7;
        ^
/usr/local/include/Block.h:236:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int8;
        ^
/usr/local/include/Block.h:237:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum1;
        ^
/usr/local/include/Block.h:238:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum2;
        ^
/usr/local/include/Block.h:239:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum3;
        ^
/usr/local/include/Block.h:240:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum4;
        ^
/usr/local/include/Block.h:261:2: error: unknown type name 'lzma_bool'
        lzma_bool ignore_check;
        ^
/usr/local/include/Block.h:263:2: error: unknown type name 'lzma_bool'
        lzma_bool reserved_bool2;
        ^
/usr/local/include/Block.h:264:2: error: unknown type name 'lzma_bool'
        lzma_bool reserved_bool3;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/sheng/electron/vue-cli-plugin-electron-builder/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok

> electron-chromedriver@5.0.1 install /Users/sheng/electron/vue-cli-plugin-electron-builder/node_modules/electron-chromedriver
> node ./download-chromedriver.js


> core-js@2.6.11 postinstall /Users/sheng/electron/vue-cli-plugin-electron-builder/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> ejs@2.7.4 postinstall /Users/sheng/electron/vue-cli-plugin-electron-builder/node_modules/ejs
> node ./postinstall.js

+ vue-cli-plugin-electron-builder@1.4.4
added 707 packages from 373 contributors and audited 5964 packages in 59.352s

4 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

✔  Successfully installed plugin: vue-cli-plugin-electron-builder

 ERROR  Error: package.json not found in /Users/sheng/electron/vue-cli-plugin-electron-builder
Error: package.json not found in /Users/sheng/electron/vue-cli-plugin-electron-builder
    at getPkg (/usr/local/lib/node_modules/@vue/cli/lib/invoke.js:25:11)
    at invoke (/usr/local/lib/node_modules/@vue/cli/lib/invoke.js:40:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

fsevents/fsevents

Answer questions fabiomcosta

Has the issue been fixed for v1? I don't see a new release so I'm not sure why it's being closed. In the meantime I'm using 1.2.9 as previously suggested.

useful!

Related questions

Node: 12.2.0 throws error during npm install hot 1
Node: 12.2.0 throws error during npm install hot 1
Node: 12.2.0 throws error during npm install hot 1
Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz hot 1
fsevents @1.2.7 | @1.2.8 does not build with Node 12 #27389 hot 1
Node: 12.2.0 throws error during npm install hot 1
Node: 12.2.0 throws error during npm install hot 1
Node: 12.2.0 throws error during npm install hot 1
Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz hot 1
fsevents binary url 404 hot 1
Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz hot 1
Node: 12.2.0 throws error during npm install hot 1
fsevents binary url 404 hot 1
Node 10: Lots of warnings and errors upon install hot 1
Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz hot 1
Github User Rank List