-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find @ember-apply/tailwind or tailwind on npm #95
Comments
Huh, i wonder if stackblitz blocks certain api requests |
Fwiw, this is the supported ember link: https://github.com/ember-cli/editor-output/tree/stackblitz-app-output Trying to work with stackblitz here: stackblitz/webcontainer-core#354 |
Not sure if this is the same problem or not, but I just tried using this for the first time (Windows 11, MINGW64 / git bash shell, new/empty ember 4.2 app):
|
🤔 I'm on linux though, and don't have a way to test on windows locally. however! if someone wants to add windows to the C.I. for this repo, that'd be hugely appreciated. the console output (lots)~/Development/tmp took 9s
❯ ember new my-app
installing app
Ember CLI v4.3.0
✨ Creating a new Ember app in <repo>:
create .editorconfig
create .ember-cli
create .eslintignore
create .eslintrc.js
create .github/workflows/ci.yml
create .prettierignore
create .prettierrc.js
create .template-lintrc.js
create .watchmanconfig
create README.md
create app/app.js
create app/components/.gitkeep
create app/controllers/.gitkeep
create app/helpers/.gitkeep
create app/index.html
create app/models/.gitkeep
create app/router.js
create app/routes/.gitkeep
create app/styles/app.css
create app/templates/application.hbs
create config/ember-cli-update.json
create config/environment.js
create config/optional-features.json
create config/targets.js
create ember-cli-build.js
create .gitignore
create package.json
create public/robots.txt
create testem.js
create tests/helpers/index.js
create tests/index.html
create tests/integration/.gitkeep
create tests/test-helper.js
create tests/unit/.gitkeep
create vendor/.gitkeep
WARNING: Ember CLI is using the global npm, but your npm version has not yet been verified to work with the current Ember CLI release.
🚧 Installing packages... This might take a couple of minutes.
npm: Installed dependencies
🎥 Initializing git repository.
Git: successfully initialized.
🎉 Successfully created project my-app.
👉 Get started by typing:
$ cd my-app
$ npm start
Happy coding!
~/Development/tmp took 50s
❯ npx ember-apply tailwind
Need to install the following packages:
ember-apply
Ok to proceed? (y) y
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
ℹ Skypack unavailable, downloading from npm
ℹ Applying: tailwind
ℹ If there are any bugs with this applyable, feel free to report at https://github.com/NullVoxPopuli/ember-apply/issues
✖ ENOENT: no such file or directory, open '/✂️/package.json'
[Error: ENOENT: no such file or directory, open '/✂️/package.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/✂️/package.json'
}
~/Development/tmp took 29s
❯ cd my-app/
my-app on main
❯ npx ember-apply tailwind
ℹ Skypack unavailable, downloading from npm
ℹ Applying: tailwind
ℹ If there are any bugs with this applyable, feel free to report at https://github.com/NullVoxPopuli/ember-apply/issues
✔ Applied feature: tailwind
my-app on main [!?]
took 8s
❯ gd
diff --git a/.gitignore b/.gitignore
index f1e859b..e2943c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,9 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
+
# compiled output
+public/assets/tailwind.css
+
/dist/
/tmp/
diff --git a/app/index.html b/app/index.html
index f5cc3b9..dc86628 100644
--- a/app/index.html
+++ b/app/index.html
@@ -8,6 +8,7 @@
{{content-for "head"}}
+ <link integrity="" rel="stylesheet" href="{{rootURL}}assets/tailwind.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/my-app.css">
diff --git a/package.json b/package.json
index 2a917a2..497d1d9 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"test": "tests"
},
"scripts": {
- "build": "ember build --environment=production",
+ "build": "npm run tailwind:build && ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
@@ -20,7 +20,9 @@
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint test:*",
- "test:ember": "ember test"
+ "test:ember": "ember test",
+ "tailwind:build": "npx tailwindcss -c ./config/tailwind/tailwind.config.js -i ./config/tailwind/tailwind-input.css -o ./public/assets/tailwind.css",
+ "tailwind:watch": "npx tailwindcss -c ./config/tailwind/tailwind.config.js -i ./config/tailwind/tailwind-input.css -o ./public/assets/tailwind.css --watch"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
@@ -59,7 +61,8 @@
"prettier": "^2.6.1",
"qunit": "^2.18.0",
"qunit-dom": "^2.0.0",
- "webpack": "^5.70.0"
+ "webpack": "^5.70.0",
+ "tailwindcss": "^3.0.0"
},
"engines": {} |
(Taking a shot at this in PR #262 ) |
I think I figured out why it wasn't working for me on Windows: the |
Facing this same issue:
Running in on macOS Monterry. |
Tried to play back with this again and got a new error:
|
what node version are you using? |
|
Does it work with 18? |
Gonna close for now -- Node 14 is EOL'd as of 30 April, 2023. If this issue is still present on newer nodes, can someone re-open with their newer node version? thanks!! |
Documenting for if some unfortunate soul bumps into this: Got the issue of:
Again on localhost despite me running the command as: pnpm exec ember-apply tailwind-webpack The thing is that for some reason my version of npm --version
6.14.16 The problem was (probably) because
So after some poking around I found that the fix would be to run following. Note: This will very likely work only on OSX. For other OS you will need to adjust the process to fix. Obviously exchange sudo chown -R michal:staff /usr/local/lib/node_modules/ And then the brew command again:
Which would then yield: npm --version
10.8.2 And after that everything works again \o/ |
I was trying to play with this + ember-cli template on stakblitz and I got this error:
Could not find @ember-apply/tailwind or tailwind on npm
.Steps to reproduce
The text was updated successfully, but these errors were encountered: