Skip to content

Commit

Permalink
build: make copy-node-modules.sh work
Browse files Browse the repository at this point in the history
Two fixes:

* In the Dockerfile, add copy-node-modules.sh before `npm install`,
  since it is needed by the new postinstall hook.
* In paver/assets.py, run copy-node-modules.sh for backwards com-
  patibility, just for cases where `SKIP_NPM_INSTALL` is enabled
  (which would prevent our new postinstall hook from running
  automatically!). We will deprecate the paver asset commands all at
  once once the new non-paver stuff is 100% working.
  • Loading branch information
kdmccormick committed Jul 18, 2023
1 parent 9ddf2c3 commit b36aab4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ RUN pip install -r requirements/edx/base.txt

# Install node and node modules
RUN nodeenv /edx/app/edxapp/nodeenv --node=16.14.0 --prebuilt
COPY scripts/copy-node-modules.sh scripts
RUN npm install -g [email protected]
COPY package.json package.json
COPY package-lock.json package-lock.json
Expand Down
3 changes: 1 addition & 2 deletions pavelib/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,7 @@ def process_npm_assets():
"""
Process vendor libraries installed via NPM.
"""
print("\t\tProcessing NPM assets is now done automatically in an npm post-install hook.")
print("\t\tThis function is now a no-op.")
sh('scripts/copy-node-modules.sh')


@task
Expand Down

0 comments on commit b36aab4

Please sign in to comment.