実現したいこと
古いバージョンのrailsを入れられること
ここに実現したいことを箇条書きで書いてください。
- ▲▲機能を動作するようにする
前提
以下のエラーが出るので、rails を古いバージョンに変更したい
$ RAILS_ENV=production bundle exec rake tmp:cache:clear
$ RAILS_ENV=production bundle exec rails assets:precompile
yarn install v1.22.19
[1/6] Validating package.json...
[2/6] Resolving packages...
success Already up-to-date.
Done in 0.46s.
Compiling...
Compilation failed:
isModuleDeclaration
has been deprecated, please migrate to isImportOrExportDeclaration
at isModuleDeclaration (/usr/local/www/mastodon/node_modules/@babel/types/lib/validators/generated/index.js:2740:35)
at PluginPass.Program (/usr/local/www/mastodon/node_modules/babel-plugin-lodash/lib/index.js:102:44)
ModuleNotFoundError: Module not found: Error: Can't resolve 'intl' in '/usr/local/www/mastodon/app/javascript/mastodon'
at /usr/local/www/mastodon/node_modules/webpack/lib/Compilation.js:925:10
at /usr/local/www/mastodon/node_modules/webpack/lib/NormalModuleFactory.js:401:22
at /usr/local/www/mastodon/node_modules/webpack/lib/NormalModuleFactory.js:130:21
at /usr/local/www/mastodon/node_modules/webpack/lib/NormalModuleFactory.js:224:22
at /usr/local/www/mastodon/node_modules/neo-async/async.js:2830:7
at /usr/local/www/mastodon/node_modules/neo-async/async.js:6877:13
at /usr/local/www/mastodon/node_modules/webpack/lib/NormalModuleFactory.js:214:25
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:213:14
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:43:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:30:40
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/forEachBail.js:30:14
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/RootPlugin.js:37:38
at _next42 (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:8:1)
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:31:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/usr/local/www/mastodon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js:27:15
at /usr/local/www/mastodon/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:85:15
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
resolve 'intl' in '/usr/local/www/mastodon/app/javascript/mastodon'
Parsed request is a module
using description file: /usr/local/www/mastodon/package.json (relative path: ./app/javascript/mastodon)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in /usr/local/www/mastodon/app/javascript
using description file: /usr/local/www/mastodon/package.json (relative path: ./app/javascript)
Field 'browser' doesn't contain a valid alias configuration
using description file: /usr/local/www/mastodon/package.json (relative path: ./app/javascript/intl)
no extension
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.jsx doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.tsx doesn't exist
.sass
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.sass doesn't exist
.scss
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.scss doesn't exist
.css
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.css doesn't exist
.module.sass
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.module.sass doesn't exist
.module.scss
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.module.scss doesn't exist
.module.css
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/mastodon/app/javascript/intl.module.css doesn't exist
.png
(以下省略)
ここに質問の内容を詳しく書いてください。
(例)
TypeScriptで●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
エラーメッセージ
上記
該当のソースコード
ruby
試したこと
ruby31-gemsを古いバージョンにおきかえてみた
/usr/local/mastodon/node_modules の中の
isModuleDeclarationを置き換えた
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。