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.sh is not installing/loading elm and uglify-js properly #848

Open
marciofrayze opened this issue Jun 19, 2020 · 0 comments
Open

build.sh is not installing/loading elm and uglify-js properly #848

marciofrayze opened this issue Jun 19, 2020 · 0 comments

Comments

@marciofrayze
Copy link

This part of build.sh is broken:

PATH=$(pwd)/node_modules/.bin:$PATH

if ! [ -x "$(command -v elm)" ]; then
  npm install elm@latest-0.19.1
fi
if ! [ -x "$(command -v uglifyjs)" ]; then
  npm install uglify-js
fi

The node_modules folder is never created (since there is no package.json). So elm and uglify-js are installed, but not in the expected directory.

How to reproduce:

npm uninstall -g uglify-js
cd /tmp
git clone https://github.com/elm/elm-lang.org.git
cd elm-lang.org
./build

Output:

pm WARN saveError ENOENT: no such file or directory, open '/private/tmp/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.

+ uglify-js@3.9.4
updated 1 package and audited 2 packages in 1.173s
found 0 vulnerabilities

PAGES
Compiling: pages/404.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/community.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/examples.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/home.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/docs/syntax.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/docs/records.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/docs/from-javascript.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/docs/advanced-topics.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/docs/style-guide.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/package-manager.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/0.15.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.14.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.10.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/0.11.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/new-adventures-for-elm.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.13.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/elm-and-prezi.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/interactive-programming.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.12.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/0.4.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/0.5.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/google-summer-of-code-2017.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/the-perfect-bug-report.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.7.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.6.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/0.12.3.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.10.1.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/farewell-to-frp.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/small-assets-without-the-headache.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.12.1.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/compilers-as-assistants.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/0.8.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/making-pong.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/how-to-use-elm-at-work.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/the-syntax-cliff.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/0.9.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/elm-and-bekk.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/repl.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/blazing-fast-html-round-two.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/0.7.1.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/news/time-travel-made-easy.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/compiler-errors-for-humans.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/blazing-fast-html.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
Compiling: pages/news/working-with-files.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/docs.elm
./build.sh: line 124: uglifyjs: command not found
./build.sh: line 123: uglifyjs: command not found
Compiling: pages/community/chat-tips.elm
./build.sh: line 123: uglifyjs: command not found
./build.sh: line 124: uglifyjs: command not found
EDITOR
./build.sh: line 135: uglifyjs: command not found

Also, to test the elm part:

npm uninstall -g elm
cd /tmp
git clone https://github.com/elm/elm-lang.org.git
cd elm-lang.org
./build

Output:


> elm@0.19.1-3 install /private/tmp/node_modules/elm
> node install.js

--------------------------------------------------------------------------------

Downloading Elm 0.19.1 from GitHub.

NOTE: You can avoid npm entirely by downloading directly from:
https://github.com/elm/compiler/releases/download/0.19.1/binary-for-mac-64-bit.gz
All this package does is download that file and put it somewhere.

--------------------------------------------------------------------------------

npm WARN saveError ENOENT: no such file or directory, open '/private/tmp/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.

+ elm@0.19.1-3
updated 1 package and audited 85 packages in 9.343s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

npm WARN saveError ENOENT: no such file or directory, open '/private/tmp/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.

+ uglify-js@3.9.4
updated 1 package and audited 85 packages in 0.81s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

PAGES
Compiling: pages/404.elm
./build.sh: line 122: elm: command not found

OS/Enviroment:

I'm running the latest MacOS and using zsh.

Ps. Thanks for this great project! :)

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

1 participant