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

Build of current HEAD do not work following the instructions in the README.md #9630

Open
FabienTregan opened this issue Jul 30, 2024 · 2 comments

Comments

@FabienTregan
Copy link

Expected Behavior

build works

Actual Behavior

:~/code/scratch-gui$ BUILD_MODE=dist npm run build

> [email protected] build
> npm run clean && webpack


> [email protected] clean
> rimraf ./build ./dist

[webpack-cli] Failed to load '/home/fabien/code/scratch-gui/webpack.config.js' config
[webpack-cli] /home/fabien/code/scratch-gui/node_modules/scratch-webpack-configuration/src/index.cjs:23
    if (path?.protocol === 'file:') {
             ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:85:18)
    at Object.<anonymous> (/home/fabien/code/scratch-gui/webpack.config.js:13:37)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:85:18)
    at WebpackCLI.tryRequireThenImport (/home/fabien/code/scratch-gui/node_modules/webpack-cli/lib/webpack-cli.js:223:30)
    at loadConfigByPath (/home/fabien/code/scratch-gui/node_modules/webpack-cli/lib/webpack-cli.js:1406:38)

:~/code/scratch-gui$ git log --all --oneline
9cc6556 (grafted, HEAD -> develop, origin/develop, origin/HEAD) Merge pull request #9629 from scratchfoundation/renovate/babel-monorepo

Steps to Reproduce

Explain what someone needs to do in order to see what's described in Actual behavior above

Here is the output of my history commands, which lead to the previous output :

 1001  git clone https://github.com/scratchfoundation/scratch-gui.git --depth 1
 1002  ll
 1003  cd scratch-gui/
 1004  npm install
 1005  sudo apt install npm
 1006  ll
 1007  npm run start
 1008  npm install --save-dev webpack
 1009  npm run start
 1010  BUILD_MODE=dist npm run build

System Details

rather fresh Mint install which had not seen any js / node / ts / ... dev before.

@FabienTregan
Copy link
Author

some more information : all tags up to v4.0.0 does the same, tag v3.6.18 works.

@alexcui03
Copy link

try to update nodejs >= 14.0.0 that supports optional chaining syntax

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