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

sqlite3 example - Unexpected identifier with import webpack from 'webpack' #45

Open
cybex-dev opened this issue Aug 28, 2019 · 1 comment

Comments

@cybex-dev
Copy link

I am new with ElectronJs & React, but more familiar with the standard NodeJS.

I wish to get more familiar with electron-react-boliderplate, not finding much docs, I go to the examples. See below for steps taken.

TL;DR SQLite3 example does not install deps

Steps Taken

Clone examples repo
https://github.com/electron-react-boilerplate/examples

Installing dependencies with
yarn install

Please note I have python2.7 installed

Output

"C:\Program Files\nodejs\node.exe" "C:\Program Files (x86)\Yarn\bin\yarn.js" install
yarn install v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[-/11] ⢀ waiting...
[2/11] ⠠ sqlite3
[-/11] ⠠ waiting...
[-/11] ⠠ waiting...
error C:\Users\s2134\WebstormProjects\examples\node_modules\erb-typescript-example: Command failed.
Exit code: 1
Command: electron-builder install-app-deps package.json && yarn build-dll && opencollective-postinstall
Arguments:
Directory: C:\Users\s2134\WebstormProjects\examples\node_modules\erb-typescript-example
Output:
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
  • electron-builder version=20.40.2
  • loaded configuration file=package.json ("build" field)
  • no native production dependencies
yarn run v1.17.3
$ cross-env NODE_ENV=development webpack --config ./configs/webpack.config.renderer.dev.dll.babel.js --colors
C:\Users\s2134\WebstormProjects\examples\examples\typescript\configs\webpack.config.renderer.dev.dll.babel.js:7
import webpack from 'webpack';
       ^^^^^^^

SyntaxError: Unexpected identifier
    at new Script (vm.js:80:7)
    at NativeCompileCache._moduleCompile (C:\Users\s2134\WebstormProjects\examples\node_modules\v8-compile-cache\v8-compile-cache.js:240:18)
    at Module._compile (C:\Users\s2134\WebstormProjects\examples\node_modules\v8-compile-cache\v8-compile-cache.js:186:36)
    at Module._compile (C:\Users\s2134\WebstormProjects\examples\node_modules\pirates\lib\index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Object.newLoader [as .js] (C:\Users\s2134\WebstormProjects\examples\node_modules\pirates\lib\index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (C:\Users\s2134\WebstormProjects\examples\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
    at WEBPACK_OPTIONS (C:\Users\s2134\WebstormProjects\examples\node_modules\webpack-cli\bin\utils\convert-argv.js:115:13)
    at requireConfig (C:\Users\s2134\WebstormProjects\examples\node_modules\webpack-cli\bin\utils\convert-argv.js:117:6)
    at C:\Users\s2134\WebstormProjects\examples\node_modules\webpack-cli\bin\utils\convert-argv.js:124:17
    at Array.forEach (<anonymous>)
    at module.exports (C:\Users\s2134\WebstormProjects\examples\node_modules\webpack-cli\bin\utils\convert-argv.js:122:15)
    at yargs.parse (C:\Users\s2134\WebstormProjects\examples\node_modules\webpack-cli\bin\cli.js:71:45)
    at Object.parse (C:\Users\s2134\WebstormProjects\examples\node_modules\webpack-cli\node_modules\yargs\yargs.js:567:18)
    at C:\Users\s2134\WebstormProjects\examples\node_modules\webpack-cli\bin\cli.js:49:8
    at Object.<anonymous> (C:\Users\s2134\WebstormProjects\examples\node_modules\webpack-cli\bin\cli.js:375:3)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\s2134\WebstormProjects\examples\node_modules\webpack\bin\webpack.js:156:2)
    at Module._compile (internal/modules/cjs/loader.js:701:30)

Did I miss something or do something wrong?

@cybex-dev cybex-dev changed the title Attempting to run SQLite3 example in examples sqlite3 example - Unexpected identifier with import webpack from 'webpack' Aug 28, 2019
@fybmain
Copy link

fybmain commented Sep 20, 2019

Same problem when running yarn install under examples/examples/typescript/

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