I have a coffeescript file changed. yeoman's watch task has tried to compile it and failed. Where to find the error message? Yeoman only output like following -
Running "coffee:dist" (coffee) task
>> Unable to compile your coffee
<WARN> Task "coffee:dist" failed. Use --force to continue. </WARN>
Upgrade to the latest version and it will:
>> Error: In app/scripts/test.coffee, Parse error on line 2: Unexpected 'INDENT'
<WARN> CoffeeScript failed to compile. Use --force to continue. </WARN>
Related
I've encountered an issue trying to use bazel as a build tool for remix. I've been able to run remix in dev mode but currently unable to get remix build to work.
I've encountered a few errors that led up to this point. I'll list the errors in the order which they occurred with my fixes (just incase any of the fixes introduces a new issue)
First error in the bazel sandbox is related to a transitive dependency of #remix-run/dev (#remix-run/dev->gunzip-maybe->browserify-zlib). Bazel failed to fetch the bazel repository #npm__browserify-zlib__0.1.4. I assumed this was a bazel issue and tried to override browserify-zlib#0.1.4 with browserify-zlib#0.2.0, which worked. Here is bazel error for reference:
ERROR: /Users/emmanuel/projects/bbbazel/WORKSPACE:89:17: fetching _npm_import rule //external:npm__browserify-zlib__0.1.4: Traceback (most recent call last):
File "/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/external/aspect_rules_js/npm/private/npm_import.bzl", line 471, column 27, in _impl
pkg_json = json.decode(rctx.read(pkg_json_path))
Error in decode: at offset 685, object has duplicate key: "main"
ERROR: /private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/external/npm/BUILD.bazel:3012:6: #npm//:npm__browserify-zlib__0.1.4_source_directory depends on #npm__browserify-zlib__0.1.4//:source_directory in repository #npm__browserify-zlib__0.1.4 which failed to fetch. no such package '#npm__browserify-zlib__0.1.4//': at offset 685, object has duplicate key: "main"
Next error in the bazel sandbox is related to another transitive dependency of #remix-run/dev (#remix-run/dev->xdm->deasync). The install lifecycle hook for the deasync npm package makes a call to the node-gyp binary which doesn't exist in the sandbox and the bazel build command fails during setup. To fix this, I disabled the install lifecycle hook (I also disabled it with a pnpm install outside the sandbox and the remix build command executed perfectly) which led to the final error. Here's the error message for this error:
/Users/emmanuel/projects/bbbazel/BUILD.bazel:5:22: Running lifecycle hooks on npm package deasync#0.1.28 failed: (Exit 1): lifecycle-hooks.sh failed: error executing command (from target //:.aspect_rules_js/node_modules/deasync#0.1.28/lc) bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/aspect_rules_js/npm/private/lifecycle/lifecycle-hooks.sh deasync ../../../external/npm__deasync__0.1.28/package ... (remaining 1 argument skipped)
/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/external/aspect_rules_js/npm/private/lifecycle/min/node-gyp-bin/node-gyp: line 5: 1211: command not found
node-gyp not found! Please upgrade your install of npm! You need at least 1.1.5 (I think) and preferably 1.1.30.
> deasync#0.1.28 install /private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/deasync#0.1.28/node_modules/deasync
> node ./build.js
===============================================================
Failure while running lifecycle hook for package 'deasync#0.1.28':
Script: 'install'
Command: `node ./build.js`
Stack trace:
spawn ENOENT
at ChildProcess.<anonymous> (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/external/aspect_rules_js/npm/private/lifecycle/min/index.min.js:1:91930)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
The final error suggests a bug with remix, but since it only occurs in the bazel sandbox I think it may be an issue that cuts across bazel and remix. The error returned is shown below:
The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new
Missing output for entry point
Error
at Object.onCompileFailure (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/commands.js:180:13)
at Object.compile (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/compiler/remixCompiler.js:34:134)
at async Object.build (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/compiler/build.js:33:3)
at async Object.build (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/commands.js:175:3)
at async Object.run (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/run.js:449:7)
Building Remix app in production mode...
Target //examples/remix:build failed to build
I've tried to run it outside bazel and with pnpm (I added the override to the package.json for browserify-zlip#0.2.0, then I ran pnpm instal with --ignore-scripts flag) and it builds fine.
I'm not sure if this is a bug with remix or a bazel issue. Has anyone else experienced this? Or does anyone having a working version of remix with bazel as the build tool?
I've created a minified version of the repository in the state of the 3rd error https://github.com/noelenwenede/bbbazel. Start up instructions are in the readme file.
I am failing to see what is the reason for the compilation error.
Also, it is worth noting that I can run my app locally. ./bin/webpack-dev-server works just fine. Running tests locally also work.
I am out of ideas, specially given I never really understood the ins and outs of webpack and all the transpilation hackery.
ERROR in ./app/javascript/src/application.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
ParserError: Syntax Error at line: 1, column 25
at /home/runner/work/my_app/my_app/app/javascript/src/application.scss:6:7298
at Parser.error (/home/runner/work/my_app/my_app/node_modules/postcss-values-parser/lib/parser.js:127:11)
at Parser.operator (/home/runner/work/my_app/my_app/node_modules/postcss-values-parser/lib/parser.js:162:20)
at Parser.parseTokens (/home/runner/work/my_app/my_app/node_modules/postcss-values-parser/lib/parser.js:245:14)
at Parser.loop (/home/runner/work/my_app/my_app/node_modules/postcss-values-parser/lib/parser.js:132:12)
at Parser.parse (/home/runner/work/my_app/my_app/node_modules/postcss-values-parser/lib/parser.js:51:17)
at parse (/home/runner/work/my_app/my_app/node_modules/postcss-custom-properties/index.cjs.js:47:30)
at /home/runner/work/my_app/my_app/node_modules/postcss-custom-properties/index.cjs.js:333:24
at /home/runner/work/my_app/my_app/node_modules/postcss/lib/container.js:194:18
at /home/runner/work/my_app/my_app/node_modules/postcss/lib/container.js:139:18
at Rule.each (/home/runner/work/my_app/my_app/node_modules/postcss/lib/container.js:105:16)
at Rule.walk (/home/runner/work/my_app/my_app/node_modules/postcss/lib/container.js:135:17)
at /home/runner/work/my_app/my_app/node_modules/postcss/lib/container.js:152:24
at Root.each (/home/runner/work/my_app/my_app/node_modules/postcss/lib/container.js:105:16)
at Root.walk (/home/runner/work/my_app/my_app/node_modules/postcss/lib/container.js:135:17)
at Root.walkDecls (/home/runner/work/my_app/my_app/node_modules/postcss/lib/container.js:192:19)
at transformProperties (/home/runner/work/my_app/my_app/node_modules/postcss-custom-properties/index.cjs.js:330:8)
at /home/runner/work/my_app/my_app/node_modules/webpack/lib/NormalModule.js:316:20
at /home/runner/work/my_app/my_app/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/runner/work/my_app/my_app/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/runner/work/my_app/my_app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /home/runner/work/my_app/my_app/node_modules/postcss-loader/src/index.js:208:9
# ./app/javascript/packs/application.js 5:30-62
I just fixed it. I had to comment out a few lines at a time in my sass fieles until I realized bootstrap could not compile. I updated it from version 5.0.0 to version 5.1.3 (latest at the time of this writing) and it fixed it.
I'm getting strang errors while trying to run nix-shell suddenly. It used to work fine, but then through no fault of my own I started getting these errors:
jon#jon-laptop ~/D/C/D/0/color-word-analyzer (master)> nix-shell
building '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv'...
installing
error: creating directory '/nix/var': Permission denied
error: creating directory '/nix/var': Permission denied
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
cabal2nix: user error (Failed to fetch source. Does this source exist? Source {sourceUrl = "/nix/store/fvka3nd7slnqgjvfkjg649v77y10lc89-color-word-analyzer", sourceRevision = "", sourceHash = Guess "", sourceCabalDir = ""})
builder for '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv' failed with exit code 1
error: build of '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv' failed
Color-word analyzer is the name of the Haskell project I'm developing. The default.nix for it is here and is pretty simple, so I don't get why this would be causing these errors.
It looks like cabal2nix is invoking a Nix command inside the sandbox. This is not permitted and probably happened by mistake in the version of Nixpkgs in your NIX_PATH. I was able to build the project with
nix-build -I nixpkgs=channel:nixos-unstable
Off-topic: recursive nix invocation will be supported with some restrictions for purity and hermeticity of results.
I am using https://github.com/twelve17/openalpr-ios this library to analyse license plate images and get license number from it.
when i try to run ruby script in mac to generate openaplr.framework it gives me error.
This is the error i am getting.
"/Volumes/DATA/Project_Stuff/openalpr-ios/lib/alpr/utils.rb:44:in
execute': Child returned: pid 587 exit 1 (RuntimeError) from
/Volumes/DATA/Project_Stuff/openalpr-ios/lib/alpr/utils.rb:74:inlog_execute'
from
/Volumes/DATA/Project_Stuff/openalpr-ios/lib/alpr/package/automake.rb:141:in
do_autoconf_build' from
/Volumes/DATA/Project_Stuff/openalpr-ios/lib/alpr/package/automake.rb:58:inbuild_arch'
from
/Volumes/DATA/Project_Stuff/openalpr-ios/lib/alpr/package/base.rb:53:in
block in install' from
/Volumes/DATA/Project_Stuff/openalpr-ios/lib/alpr/package/base.rb:52:ineach'
from
/Volumes/DATA/Project_Stuff/openalpr-ios/lib/alpr/package/base.rb:52:in
install' from ./bin/build_frameworks.rb:53:in
Thanks.
I had the same issue and fixed it by comment line:
#opts[:exit_on_error] = true if !opts.has_key?(:exit_on_error)
in file utils.rb line number 24.
System Mac OSX10.10, xCode7.2.1
I encountered some weird errors when running "pub install" for dart-html5-samples. The first one was:
Illegal argument(s): join(): part 0 was null, but part 1 was not.
The second one was:
Running pub install ...
Pub install failed, [1] Resolving dependencies...
Could not find package "unittest 0.0.0-r.13075" at http://pub.dartlang.org.
What's going on, and how do I fix it?
The first error is:
Illegal argument(s): join(): part 0 was null, but part 1 was not.
That's because pubspec.yaml contained:
dependencies:
htmlescape:
sdk: htmlescape
htmlescape no longer comes with the SDK. Removing the dependency fixed the problem. I simply made a copy of htmlescape.dart in my lib directory. Eventually, I won't need my own copy once the following bug is fixed:
http://code.google.com/p/dart/issues/detail?id=1657
The second error is:
Running pub install ...
Pub install failed, [1] Resolving dependencies...
Could not find package "unittest 0.0.0-r.13075" at http://pub.dartlang.org.
dart-html5-samples depends on vector_math which depends on unittest. I think they must have changed how unittest is loaded by pub. Running pub update fixed the problem.