CDLUC3 / dmptool

DMPTool version of the DMPRoadmap codebase
https://dmptool.org
MIT License
57 stars 13 forks source link

preferences.js.erb fails in deploy step #456

Closed terrywbrady closed 1 year ago

terrywbrady commented 1 year ago

For now, I converted the file back to preferences.js

Notice: /Stage[main]/Uc3_dmp_tool/Uc3_dmp_tool::Config[stage]/Exec[bundle exec cap]/returns: ERROR in ./app/javascript/src/dmptool/orgAdmin/templates/preferences.js.erb
Notice: /Stage[main]/Uc3_dmp_tool/Uc3_dmp_tool::Config[stage]/Exec[bundle exec cap]/returns: Module build failed (from ./node_modules/rails-erb-loader/index.js):
Notice: /Stage[main]/Uc3_dmp_tool/Uc3_dmp_tool::Config[stage]/Exec[bundle exec cap]/returns: Error: rails-erb-loader failed with code: 1
Notice: /Stage[main]/Uc3_dmp_tool/Uc3_dmp_tool::Config[stage]/Exec[bundle exec cap]/returns:     at ChildProcess.<anonymous> (/apps/dmp/apps/dmptool/releases/20230407192149/node_modules/rails-erb-loader/index.js:128:16)
terrywbrady commented 1 year ago

Note from Scott:

I see something about a rails-erb-loader in there, which is apparently a node module rather than a Rails one based on the file location? (edited)

12:39 Yeah, this seems specific to this NPM module from what I can tell and isn't caused by Rails interpreting the .erb, I think. https://www.npmjs.com/package/rails-erb-loader (edited) npmnpm rails-erb-loader Embedded Ruby (.erb) webpack loader for Ruby projects.. Latest version: 5.5.2, last published: 4 years ago. Start using rails-erb-loader in your project by running npm i rails-erb-loader. There are 3 other projects in the npm registry using rails-erb-loader. 12:40 I've never used that NPM library, so likely it would be where you'd want to start poking around to see how it works and any dependencies or things you have to do.

terrywbrady 12:40 PM Thanks New

sfisher 12:42 PM I wouldn't be surprised if that js.erb might not work unless it is called from another js.erb. So if that's the case you might try that. It's a wild guess without knowing the library.

briri commented 1 year ago

can we close this one out now @terrywbrady ?

terrywbrady commented 1 year ago

Yes, this is looking good.