Warning route-recognizer - ember.js

I need some help here..
Just updated my ember-cli to 0.1.9 version and the only problem is this warning:
Warning: ignoring input sourcemap for
bower_components/route-recognizer/dist/route-recognizer.js because
ENOENT, no such file or directory
'/Users/Zaca/Eyenetra/portal/tmp/tree_merger-tmp_dest_dir-kOIywY0K.tmp/bower_components/route-recognizer/dist/route-recognizer.js.map'
Here's my call to this addon on brocfile.js:
//brocfile.js
(...)
app.import('bower_components/moment/moment.js');
app.import({development: 'bower_components/route-recognizer/dist/route-recognizer.js'});
app.import({development: 'bower_components/FakeXMLHttpRequest/fake_xml_http_request.js'});
app.import({development: 'bower_components/pretender/pretender.js'});
module.exports = app.toTree();
This happens when I build my project for tests and for local server.
Any ideas?
Thanks for the help! o/

We have actually moved away from using Pretender, since at the moment we always have a staged API up and running.
In doing that, we removed the following from our Brocfile:
app.import({development: 'bower_components/route-recognizer/dist/route-recognizer.js'});
app.import({development: 'bower_components/FakeXMLHttpRequest/fake_xml_http_request.js'});
app.import({development: 'bower_components/pretender/pretender.js'});
With that the warning went away.
Aside: I'm unsure of the implications of not having route-recognizer there, but so far there has been no effect without it.

I'm still getting this problem, even after deleting my component and tmp folders and cleaning my caches. However, looks like this is a known issue that a lot of other people are having as well:
https://github.com/tildeio/route-recognizer/issues/44
I will be watching this to see when an update comes out. In the meantime I guess I will just have to live with the warning.
There is already a temporary fix here:
https://github.com/tildeio/route-recognizer/pull/45/files

After some cleanup, this warning message never happened again.
To really cleanup, you have to do these steps:
rm -rf bower_components/
rm -rf dist
rm -rf node_modules/
rm -rf tmp
npm cache clean
bower cache clean
And, after, the normal install steps
npm install
bower install
Hope that work for analog situations =)

I found that doing an ember install of some dependencies worked.
We had mirage and yadda dependencies. I did
ember install ember-cli-mirage
ember install ember-cli-yadda
and then
ember build
Built project successfully. Stored in "dist/"
You do some great things with ember and then there are days like this.

Related

I am getting this error while making a project in expo using this command-> expo init project-name

? Choose a template: blank
[16:22:15] Extracting project files...
Process exited with non-zero code: 2
ERROR: Unexpected end of data : blank-30.1.0.tar
Process exited with non-zero code: 2
[16:22:17] zlib: unexpected end of file
[16:22:17] Set EXPO_DEBUG=true in your env to view the stack trace.
I had the same issue today but I found the answer.
The file blank-30.1.0.tar was not downloaded correctly. Trying to clear the npm cache won't help, because expo has its own cache.
Use this command to clear the expo cache on Windows or on Linux:
rm -fr ~/.expo/starter-app-cache
or try to find it on macOS under ~\.exponent\starter-app-cache\
Delete .expo folder
Run
npm -g uninstall expo-cli --save
npm install -g expo-cli#latest
expo init <project-name>
Bingo!
I have manually deleted my file from .expo folder. As my system not recognize rm -fr command.
You can find cache file in c:/users/$userName/.expo in windows.

Cannot find module 'enquire.js' from 'slider.js'

I am using Antd with React, Jest and Enzyme. While testing simple shallow rendering I am getting error
"Cannot find module 'enquire.js' from 'slider.js'"
at Resolver.resolveModule (node_modules\jest-resolve\build\index.js:151:17
at Object. (node_modules\react-slick\lib\slider.js:37:38)
at Object. (node_modules\react-slick\lib\index.js:3:18)index file, test file and Error
I just want to copy the solution for this which where given here: https://github.com/ant-design/ant-design/issues/6317
For npm: rm -rf node_modules && npm install
For yarn: yarn upgrade
I found a very short way of above, just try this :
npm i enquire-js#0.1.0
0.1.0 depend on version come out

ember-cli cleanup error when building

I had ember-cli installed on my computer and my app was running perfectly, but yesterday I formatted my computer and upgraded to windows 10 and tried to install ember-cli exactly the same way it was before but now when I try to build or run my application I get this error:
Future versions of Ember CLI will not support v4.2.1. Please update to Node 0.12 or io.js.
version: 1.13.8
Cleanup error.
ENOTEMPTY: directory not empty, rmdir 'C:\Software\company\product\client-side\product2\tmp\concat_with_maps-output_path-jfPUvJvW.tmp'
Error: ENOTEMPTY: directory not empty, rmdir 'C:\Software\company\product\client-side\product2\tmp\concat_with_maps-output_path-jfPUvJvW.tmp'
at Error (native)
at Object.fs.rmdirSync (fs.js:763:18)
at rmkidsSync (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:247:11)
at rmdirSync (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:237:7)
at fixWinEPERMSync (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:150:5)
at Function.rimrafSync [as sync] (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:216:26)
at Object.remove (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\node_modules\broccoli-plugin\node_modules\quick-temp\index.js:26:12)
at ReadCompat.cleanup (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\node_modules\broccoli-plugin\read_compat.js:69:13)
at ConcatWithMaps.Plugin.cleanup (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\node_modules\broccoli-plugin\index.js:113:49)
at cleanupTree (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli\lib\builder.js:147:17)
Build failed.
ENOENT: no such file or directory, open 'C:\Software\company\product\client-side\product2\tmp\concat_with_maps-input_base_path-QzODcQgu.tmp\0\C:\Software\company\product\client-side\product2\tmp\concat_with_maps-input_base_path-QzODcQgu.tmp\0\ember-basic-dropdown\components\basic-dropdown.js'
Error: ENOENT: no such file or directory, open 'C:\Software\company\product\client-side\product2\tmp\concat_with_maps-input_base_path-QzODcQgu.tmp\0\C:\Software\company\product\client-side\product2\tmp\concat_with_maps-input_base_path-QzODcQgu.tmp\0\ember-basic-dropdown\components\basic-dropdown.js'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at SourceMap.addFile (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\fast-sourcemap-concat\lib\source-map.js:68:19)
at ConcatWithMaps.<anonymous> (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\concat-with-maps.js:96:17)
at Array.forEach (native)
at ConcatWithMaps.addFiles (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\concat-with-maps.js:93:9)
at ConcatWithMaps.build (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\concat-with-maps.js:65:8)
at C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\index.js:152:21
at lib$rsvp$$internal$$tryCatch (C:\Software\company\product\client-side\product2\node_modules\ember-cli\node_modules\rsvp\dist\rsvp.js:493:16)
node v4.2.1
npm v2.14.7
But I've tried with others versions and the problem persisted.
The same application is working perfectly on another computer which also has windows 10 and the same node and npm versions.
If you need any extra information leave a comment and I'll edit the question.
I had the same problem today. It seems there's a bug in a dependency module:
"name": "fast-sourcemap-concat",
"version": "0.2.6"
it does not handle properly Windows paths starting with drive letters, like C:/.
For now, I fixed it manually in fast-sourcemap-concat/lib/source-map.js, function _resolveFile, line 55, changing:
if (this.baseDir && filename.slice(0,1) !== '/') {
to:
if (this.baseDir && filename.slice(0,1) !== '/' && filename.slice(1,3) !== ':/') {
Seems to fix the issue for me. Good luck!
This was fixed in https://github.com/ember-cli/ember-cli/issues/5055
You will need to reinstall your node modules:
rm -rf node_modules
npm cache clear
npm install
Try to reinstall Ember CLI in your project directory (local version). You can follow the steps from Ember CLI GitHub releases page - start with rm -rf node_modules bower_components dist tmp and continue following Project Update guide.

Ember error: path "vendor/loader.js/loader.js" did not match any files

Building off: Ember-cli - Bower not installing properly
I just upgraded from ember-cli 0.0.40 to 0.1.2 and when I run the ember server I also have an issue with moment. 48 JSHint Errors of Bad option: 'moment'.
After JSHint is done letting me have it, I did a bad path error for loader.js:
Path or pattern "vendor/loader.js/loader.js" did not match any files
Error: Path or pattern "vendor/loader.js/loader.js" did not match any files
at Object.multiGlob (/home/mikeumus/Downloads/RentalGeek/Development/portola-workon29oct/node_modules/ember-cli/node_modules/broccoli-concat/node_modules/broccoli-kitchen-sink-helpers/index.js:221:13)
at /home/mikeumus/Downloads/RentalGeek/Development/portola-workon29oct/node_modules/ember-cli/node_modules/broccoli-concat/index.js:62:32
at $$$internal$$tryCatch (/home/mikeumus/Downloads/RentalGeek/Development/portola-workon29oct/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)
at $$$internal$$invokeCallback (/home/mikeumus/Downloads/RentalGeek/Development/portola-workon29oct/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)
at $$$internal$$publish (/home/mikeumus/Downloads/RentalGeek/Development/portola-workon29oct/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:453:11)
at $$rsvp$asap$$flush (/home/mikeumus/Downloads/RentalGeek/Development/portola-workon29oct/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)
at process._tickCallback (node.js:419:13)
Before upgrading to ember-cli#0.1.2 I was getting an includes error for ember-cli-simple-auth. I did do ember g ember-cli-simple-auth and that's nifty, but the above error persists.
Make sure to follow the steps on the releases page to have a solid upgrade.
Specifically in your case, this is likely caused by an app.import in your Brocfile.js. One of the big changes was that bower components were moved to /bower_components instead of /vendor. That error says that something is trying to import loader.js from the vendor directory.
It could be caused by you trying to import it in your Brocfile or due to ember-cli not being updated properly in your node_modules folder. If it still references the old version, it will try to import from vendor/ instead of bower_components. To fix that, just rm -rf node_modules and npm install to reinstall the modules.
The releases page mentions how to clear your npm cache to reinstall everything if you are still having trouble.

Yuglify compressor can't find binary from package installed through npm

I have a fresh virtualenv environment and have got the latest django-pipleline.
The JS compression with Closure works perfect, but CSS compression with Yuglify fails, due a node error:
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.closure.ClosureCompressor'
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
When I try to collect the static:
./manage.py collectstatic
It says:
pipeline.compressors.CompressorError: /usr/bin/env: node: No such file or directory
But I have clearly installed yuglify even as global:
sudo npm -g install yuglify
/usr/local/bin/yuglify -> /usr/local/lib/node_modules/yuglify/bin/yuglify
yuglify#0.1.2 /usr/local/lib/node_modules/yuglify
├── uglify-js#1.3.4
├── ycssmin#1.0.1
└── nopt#2.1.1
Trying to set the biney in settings doesn't help either:
PIPELINE_YUGLIFY_BINARY = '/usr/local/bin/yuglify'
I still get the same error. Why now such problems with npm? Is there something I have to setup additionally?
Alternatively is there a way to install yuglify with pip?
Many Thanks,
After 3 hours of suffering, I have found the solution.
This is happening because of a misnaming error, if you install from a package manager (npm) your bin may be called nodejs so you just need to symlink it like this:
ln -s /usr/bin/nodejs /usr/bin/node
Now it is working. This didn't happen with the older version, its is something new. But at least it is working again. I hope this helps someone else out there. :)
In my case both uglify-js and cssmin were somehow not installed.
So I have re-installed them again by using following command and then it starts working again.
sudo npm install -g cssmin uglify-js