Comments (7)
For making it work on macos I had to change unfortunately another line in the DirectoryWatcher.js
:
function DirectoryWatcher(directoryPath, options) {
...
this.watcher = chokidar.watch(directoryPath, {
...
followSymlinks: true,
depth: 1,
Seems that on macos if you don't increase the depth of the traversed subdirectories changes are not detected. I have opened a ticket webpack/watchpack#141 to understand if this is something is known and fixed in the latest beta version.
from invenio-app-rdm.
Made to work in debug mode. Steps to follow:
- Install
invenio-app-rdm
. - Edit the
config.py
and add:
from invenio_app.config import APP_DEFAULT_SECURE_HEADERS
APP_DEFAULT_SECURE_HEADERS['content_security_policy'] = {}
WEBPACKEXT_STORAGE_CLS = 'pywebpack.storage.LinkStorage'
- Install
invenio-assets
from GitHub master branch.- Edit the
invenio_assets/assets/build/webpack.config.js
and add:
- Edit the
var webpackConfig = {
...
resolve: {
...
symlinks: false
},
...
}
- Since
--watch
does not work with symlinks we need to editDirectoryWatcher.js
. Edit<instance_path>/assets/node_modules/watchpack/lib/DirectoryWatcher.js
function DirectoryWatcher(directoryPath, options) {
...
this.watcher = chokidar.watch(directoryPath, {
...
followSymlinks: true,
-
Open two terminals: In each one of them export:
FLASK_ENV=development
NODE_PRESERVE_SYMLINKS=1
-
In Terminal 1 run:
./scripts/bootstrap
./scripts/setup
invenio run --cert ./docker/nginx/test.t --key ./docker/nginx/test.key
- In Terminal 2 run:
invenio webpack run start
Starting implementing the changes in the correct places.
Kudos @slint for the guidelines and work :)
from invenio-app-rdm.
Since it's not sure if more changes are coming, I've made the webpack-fixes
WIP branch in invenio-assets
, which can be checked out and contains part of the changes (specifically steps 3 and 5)
from invenio-app-rdm.
@slint Thanks! I added a comment here: inveniosoftware/invenio-assets@094c1ef
The most problematic might be point 4.
followSymlinks
was added on watchpack (see webpack/watchpack#114). However, it is not compatible with webpack 4 (it cannot be set from there) and as stated here webpack/webpack#6845 it will come with webpack 5...
While searching for the option I did not find it. So I guess it is fixed somehow different in webpack 5 (I'll keep investigating)
Thoughts?
from invenio-app-rdm.
Isn't this solved by #59 ?
from invenio-app-rdm.
@lnielsen if we move the information on how to you can make webpack work locally in another issue this one can be closed! I will create an issue and I will close it!
from invenio-app-rdm.
Created this #65 out of the information here!
from invenio-app-rdm.
Related Issues (20)
- Subjects should be labelled by a localizable title string in the UI and not their ID
- deposit form: share draft
- Search Facets Not Dynamic HOT 3
- deposit-ui: preview checkbox shouldn't be displayed for files that cannot be previewed
- Files with apostrophes in file name fail to upload
- secret links: CSRF token not set on editing record as anonymous
- DOIs for restricted records: configure tombstone page for the doi link
- Add meta generator tag
- deposit-ui: default license for software
- Creators Roles Don't Show in UI HOT 1
- Review usage of dangerousInnerHTML in react for v11 HOT 1
- secret links: review permissions logic HOT 1
- REST API: Community Logo Update after deletion results in 500 IntegrityError HOT 6
- REST API: Community Deletion Error for Non-Existing Community 500 Internal Server Error
- REST API: Create Community Endpoint with Wrong Body Results in 500 Internal Server Error
- REST API: Update a request with no JSON body result in 500 Error
- administration: drafts link is incorrect HOT 4
- bug: clicking on creator names resolves to inaccurate search query HOT 1
- Secret Links: Share Links Feature Not Working for Restricted Records on drafts HOT 3
- Unclear Validation Error When Featuring Restricted Community HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invenio-app-rdm.