Comments (5)
What command did you run?
from jumpstart.
rails new jumpstart_app --no-rc -m ./jumpstart/template.rb
I used --no-rc
to ignore my local .railsrc
.
from jumpstart.
So, if I create a default rails 7 app (importmaps), add jsbundling-rails
gem, and then run command for esbuild, I get the same error.
This might be an issue with the gem.
from jumpstart.
Adding to this.
rails new myapp -d postgresql -m https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb
Install esbuild
run yarn add esbuild from "."
yarn add v1.22.18
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ [email protected]
└─ [email protected]
✨ Done in 1.06s.
Add build script
run npm set-script build "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds" from "."
run yarn build from "."
yarn run v1.22.18
$ esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds
✘ [ERROR] Could not resolve "@hotwired/turbo-rails"
app/javascript/application.js:2:7:
2 │ import "@hotwired/turbo-rails"
╵ ~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@hotwired/turbo-rails" as external to exclude it from the bundle,
which will remove this error.
✘ [ERROR] Could not resolve "controllers"
app/javascript/application.js:3:7:
3 │ import "controllers"
│ ~~~~~~~~~~~~~
╵ "./controllers"
Use the relative path "./controllers" to reference the file
"app/javascript/controllers/index.js". Without the leading "./", the path "controllers"
is being interpreted as a package path instead.
2 errors
node:child_process:867
throw err;
^
Error: Command failed: /Users/bakosy/tmp/myapp/node_modules/esbuild-darwin-64/bin/esbuild app/javascript/application.js --bundle --sourcemap --outdir=app/assets/builds
at checkExecSyncError (node:child_process:826:11)
at Object.execFileSync (node:child_process:864:15)
at Object.<anonymous> (/Users/bakosy/tmp/myapp/node_modules/esbuild/bin/esbuild:172:28)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 13020,
stdout: null,
stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
run yarn add local-time esbuild-rails trix @hotwired/stimulus @hotwired/turbo-rails @rails/activestorage @rails/ujs @rails/request.js from "."
yarn add v1.22.18
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 20 new dependencies.
info Direct dependencies
├─ @hotwired/[email protected]
├─ @hotwired/[email protected]
├─ @rails/[email protected]
├─ @rails/[email protected]
├─ @rails/[email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
info All dependencies
├─ @hotwired/[email protected]
├─ @hotwired/[email protected]
├─ @hotwired/[email protected]
├─ @rails/[email protected]
├─ @rails/[email protected]
├─ @rails/[email protected]
├─ @rails/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
✨ Done in 3.01s.
from jumpstart.
A little more...
~/tmp/myapp$ npm run build
> build
> esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds
✘ [ERROR] Could not resolve "@hotwired/turbo-rails"
app/javascript/application.js:2:7:
2 │ import "@hotwired/turbo-rails"
╵ ~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@hotwired/turbo-rails" as external to exclude it from
the bundle, which will remove this error.
✘ [ERROR] Could not resolve "controllers"
app/javascript/application.js:3:7:
3 │ import "controllers"
│ ~~~~~~~~~~~~~
╵ "./controllers"
Use the relative path "./controllers" to reference the file
"app/javascript/controllers/index.js". Without the leading "./", the path
"controllers" is being interpreted as a package path instead.
2 errors
from jumpstart.
Related Issues (20)
- Vips::Error - Missing resize option
- Uninitialized constant HomeController on Rails 7.0.1 fresh install HOT 9
- Duplicate `Gemfile` entry for `cssbundling-rails` when creating a new app HOT 7
- New app fails to boot, `Could not resolve "./application"` HOT 7
- Rails 6.1.0 - Jumpstart Install is currently broken at esbuild
- Gem image_processing mentioned twice in the Gemfile HOT 1
- NameError in Madmin::Users#new HOT 3
- Rails app failing on rails s HOT 11
- Pretender button in MADMIN
- Fails at add_esbuild_script set-script deprecated in npm v9 HOT 2
- x
- Error updating avatar HOT 1
- Various errors with a new project HOT 2
- Rails 6.1 errors HOT 3
- Error: Can't find stylesheet to import
- How to broadcast without logged in user
- bin/dev does not exist HOT 3
- Omit `config.action_mailer.default_url_options` in next release of Rails HOT 3
- Non-english chars in "jumpstart.yml" break the app 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 jumpstart.