sketch-hq / unsplash-sketchplugin

Unsplash Data Provider plugin, for Sketch 52+
MIT License
71 stars 8 forks source link

DataProvider.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals #28

Closed icedawn closed 4 years ago

icedawn commented 4 years ago

Fix: src/DataProvider.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'

The new package-lock.json and package.json files were generated by 'npm update -s'.

$ npm install

fsevents@1.2.11 install /Users/crump/scratch/icedawn/unsplash-sketchplugin/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:6: In file included from ../../nan/nan.h:2884: ../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations] data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset; ^ /Users/crump/Library/Caches/node-gyp/14.3.0/include/node/v8.h:5202:3: note: 'GetContents' has been explicitly marked deprecated here V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.") ^ /Users/crump/Library/Caches/node-gyp/14.3.0/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'

define V8_DEPRECATE_SOON(message) [[deprecated(message)]]

                                  ^

1 warning generated. SOLINK_MODULE(target) Release/fse.node

unsplash@1.1.1 postinstall /Users/crump/scratch/icedawn/unsplash-sketchplugin npm run build && skpm-link

unsplash@1.1.1 build /Users/crump/scratch/icedawn/unsplash-sketchplugin skpm-build

[1/4] 🖨 Copied src/manifest.json in 2ms [2/4] 🔨 Copied assets/placeholder.png [3/4] ⚒ Copied assets/icon.png error Error while building DataProvider.js ./src/DataProvider.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: [BABEL] /Users/crump/scratch/icedawn/unsplash-sketchplugin/src/DataProvider.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals' Require stack:

npm ERR! A complete log of this run can be found in: npm ERR! /Users/crump/.npm/_logs/2020-05-24T20_59_43_574Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! unsplash@1.1.1 postinstall: npm run build && skpm-link npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the unsplash@1.1.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/crump/.npm/_logs/2020-05-24T20_59_43_645Z-debug.log

christianklotz commented 4 years ago

Before merging this, we got to confirm it's working as expected with the Mac app.

bomberstudios commented 4 years ago

Works as expected, so merging.

Thanks for the PR, @icedawn!

icedawn commented 4 years ago

My pleasure! Thanks for a great product!