I'm using the ng cli for the first time. I'm trying to make a new module ('foo') and a new component ('bar') under the foo module. Though, how I think I'm supposed to do it in ng cli doesn't seem to work:
mbp:my-new-app chris$ ng g m foo
installing module
create src/app/foo/foo.module.ts
mbp:my-new-app chris$ ng g c bar -m foo
installing component
create src/app/bar/bar.component.scss
create src/app/bar/bar.component.html
create src/app/bar/bar.component.spec.ts
create src/app/bar/bar.component.ts
EISDIR: illegal operation on a directory, read
Error: EISDIR: illegal operation on a directory, read
at Error (native)
at Object.fs.readSync (fs.js:732:19)
at tryReadSync (fs.js:487:20)
at Object.fs.readFileSync (fs.js:535:19)
at Class.afterInstall (/Users/chris/code/my-new-app/node_modules/#angular/cli/blueprints/component/index.js:209:34)
at tryCatch (/Users/chris/code/my-new-app/node_modules/rsvp/dist/rsvp.js:539:12)
at invokeCallback (/Users/chris/code/my-new-app/node_modules/rsvp/dist/rsvp.js:554:13)
at publish (/Users/chris/code/my-new-app/node_modules/rsvp/dist/rsvp.js:522:7)
at flush (/Users/chris/code/my-new-app/node_modules/rsvp/dist/rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
ng cli version:
mbp:my-new-app chris$ ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
#angular/cli: 1.0.0
node: 6.10.1
os: darwin x64
#angular/common: 4.0.1
#angular/compiler: 4.0.1
#angular/core: 4.0.1
#angular/forms: 4.0.1
#angular/http: 4.0.1
#angular/platform-browser: 4.0.1
#angular/platform-browser-dynamic: 4.0.1
#angular/router: 4.0.1
#angular/cli: 1.0.0
#angular/compiler-cli: 4.0.1
Am I doing using this wrong? I haven't found documentation specifically on this feature.
Thanks!
instead of running
ng g c bar -m foo
try to run (without -m)
ng g c foo/bar
if you want to reference a module, which should export/import your new component, you should provide a relative path to this module, like:
ng g c bar -m foo/foo.module
in this case bar component will be imported/exported by foo.module, but located under src/app.
EASDIR error occurred because you provided a directory (foo) instead of file (foo/foo.module)
as answered for example here:
EISDIR means that the target of the operation is a directory in reality but that the expected filetype of the target is something other than a directory.
Related
when I was trying to start my npm project I got the following error:
/home/projects/reactive-weather/reactive-weather/app/node_modules/expo/src/Location.js:
Cannot find module '#babel/preset-env' from '/home/projects/reactive-weather/reactive-weather/app'
Surely I need to install this module but after I did, I'm getting this error:
Error: /home/projects/reactive-weather/reactive-weather/app/node_modules/expo/src/Location.js: Unexpected token, expected ";" (9:5)
7 | const LocationEventEmitter = new NativeEventEmitter(NativeModules.ExponentLocation);
8 |
> 9 | type ProviderStatus = {
| ^
10 | locationServicesEnabled: boolean,
11 | gpsAvailable: ?boolean,
12 | networkAvailable: ?boolean,
10:43:44 AM: Failed building JavaScript bundle
Everything was perfectly fine, the last thing I've done before this happened was using git commands like: git stash also I had to perform npm audit fix but I don't think any libs were vulnerable.
I want to migrate my app angular4 to angular5, but it's looks ng version have some issue with latest version.
Any Idea what is the stable version for angular5. #angular/cli.
Step I followed:
Installed latest version of node 8.9.1
npm install -g #angular/cli#latest
ng -v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.5.5
Node: 8.9.1
OS: darwin x64
Angular: error
... animations, cli, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router
typescript: error
webpack: error
it's work after install npm install typescript#2.4.2 --save-exact ...
Thanks.! – Umang Savaliya Dec 7 '17 at 9:34
Solved in their comments by checking the dependencies are up to date.
npm install typescript#2.4.2 --save-exact with Angular 5.1 with Angular-CLI v1.6.0
Resolve this issue.
I recently updated my global A2 CLI, as well as an existing project, to:
_ _ _
__ _ _ __ __ _ _ _ | | __ _ _ __ ___ | |(_)
/ _` || '_ \ / _` || | | || | / _` || '__|_____ / __|| || |
| (_| || | | || (_| || |_| || || (_| || | |_____|| (__ | || |
\__,_||_| |_| \__, | \__,_||_| \__,_||_| \___||_||_|
|___/
#angular/cli: 1.0.0-beta.30
node: 7.4.0
os: darwin x64
#angular/common: 2.4.6
#angular/compiler: 2.4.6
#angular/core: 2.4.6
#angular/forms: 2.4.6
#angular/http: 2.4.6
#angular/platform-browser: 2.4.6
#angular/platform-browser-dynamic: 2.4.6
#angular/router: 3.4.6
#angular/cli: 1.0.0-beta.30
#angular/compiler-cli: 2.4.6
When I spin up ng serve on the project it runs fine but when I upload it to my vm I get the following errors:
[Error] SyntaxError: Unexpected token '<'
(anonymous function) (inline.bundle.js:1)
[Error] SyntaxError: Unexpected token '<'
(anonymous function) (polyfills.bundle.js:1)
[Error] ReferenceError: Can't find variable: webpackJsonp
Global Code (styles.bundle.js:1)
[Error] SyntaxError: Unexpected token '<'
(anonymous function) (vendor.bundle.js:1)
[Error] ReferenceError: Can't find variable: webpackJsonp
Global Code (main.bundle.js:1)
This morning I created a new project and uploaded it to the vm without additional changes, to see if it was something in the project update, and I get the same errors.
Pretty stumped on what's going on here. This is the first time I've encountered it and my projects have worked fine locally and remotely before updating.
The remote system is a Windows Server 2012 with XAMPP.
My local system is a Mac, usually running the app via ng serve, but checked with MAMP and it works under Apache there, too.
Has anyone run across this?
So evidently it had something to do with the directory. The app runs in a subdirectory on my vm and that hasn't posed a problem in the past. When I changed the bas href from "/" to "./", it worked again.
I have an app that worked fine last year on the earlier versions of sdk but now Titanium SDK 5.2.2.GA won't find iOS devices. I tried cleaning everything about appcelerator and reinstall but no luck. I also tried installing node-ios-device as a global package and in the titanium sdk 5.2.2 folder. What else can I do?
I get the following error:
2016-05-11T09:34:54.590Z | DEBUG | [PLUGIN-LOAD] 0ms /Users/adi/.appcelerator/install/5.2.2/package/appc.js
(node:2212) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
2016-05-11T09:34:54.651Z | DEBUG | [PLUGIN-LOAD] 61ms /Users/adi/.appcelerator/install/5.2.2/package/node_modules/appc-cli-titanium/appc.js
2016-05-11T09:34:54.651Z | DEBUG | run plugin: /Users/adi/.appcelerator/install/5.2.2/package/node_modules/appc-cli-titanium
2016-05-11T09:34:54.652Z | DEBUG | [PLUGIN-LOAD] 0ms /Users/adi/.appcelerator/install/5.2.2/package/node_modules/arrow/appc.js
2016-05-11T09:34:54.654Z | DEBUG | run plugin: /Users/adi/.appcelerator/install/5.2.2/package/node_modules/arrow
2016-05-11T09:34:54.656Z | TRACE | plugin "arrow" failed its "when" function check, skipping...
2016-05-11T09:34:54.657Z | TRACE | loading plugin "titanium" for command "run" CLI options via function
2016-05-11T09:34:54.658Z | TRACE | loading plugin "titanium" for command "run" CLI options via array
2016-05-11T09:34:54.660Z | TRACE | executing command "run" with the following plugins:
["titanium"]
2016-05-11T09:34:54.661Z | TRACE | Attempting to load session info from config file
2016-05-11T09:34:54.662Z | TRACE | check if session is invalidated
2016-05-11T09:34:55.350Z | TRACE | session expiry 1463560847951 false
2016-05-11T09:34:55.351Z | TRACE | session already loaded in opts.session
2016-05-11T09:34:55.352Z | DEBUG | Titanium Downloads Last Checked: 1462957150130
2016-05-11T09:34:55.480Z | TRACE | No project alloy hook; skipping update to 1.0.0
2016-05-11T09:34:56.100Z | ERROR | An uncaught exception was thrown!
Cannot read property 'devices' of undefined
2016-05-11T09:34:56.101Z | ERROR | Cannot read property 'devices' of undefined
2016-05-11T09:34:56.101Z | TRACE | TypeError: Cannot read property 'devices' of undefined
at iOSBuilder.<anonymous> (/Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/iphone/cli/commands/_build.js:298:11)
at /Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/ioslib/index.js:115:12
at /Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/async/lib/async.js:721:13
at /Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/async/lib/async.js:52:16
at done (/Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/async/lib/async.js:241:17)
at /Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/async/lib/async.js:44:16
at /Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/async/lib/async.js:718:17
at /Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/async/lib/async.js:167:37
at /Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/ioslib/index.js:85:6
at /Users/adi/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA/node_modules/ioslib/lib/device.js:51:12
For anybody who encounters this, the problem is the NodeJS version, I had v6.2.0 and downgraded to v4.4.4. All works now.
Thanks Adi, I had the exact same issue v6.2.0 of Node and downgraded to v4.4.x and all works for me as well.
I try to use rabbit on ubuntu 12.04. After installation rabbitmq-server works fine. Than I stop it and add my configuration file.
root#rabbit1:~# tail /etc/rabbitmq/rabbitmq-env.conf
RABBITMQ_CONFIG_FILE=/etc/rabbitmq/myrabbitmq
root#rabbit1:~# tail /etc/rabbitmq/myrabbitmq.config
[{rabbit,
[{cluster_nodes, {['rabbit#rabbit1', 'rabbit#rabbit2'], disc}}]}].
With this files rabbitmq-server says on start:
root#rabbit1:~# rabbitmq-server
Activating RabbitMQ plugins ...
0 plugins activated:
+---+ +---+
| | | |
| | | |
| | | |
| +---+ +-------+
| |
| RabbitMQ +---+ |
| | | |
| v2.7.1 +---+ |
| |
+-------------------+
AMQP 0-9-1 / 0-9 / 0-8
Copyright (C) 2007-2011 VMware, Inc.
Licensed under the MPL. See http://www.rabbitmq.com/
node : rabbit#rabbit1
app descriptor : /usr/lib/rabbitmq/lib/rabbitmq_server-2.7.1/sbin/../ebin/rabbit.app
home dir : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/myrabbitmq.config
cookie hash : 31CaH3BCSDNL1hDIFQzH2Q==
log : /var/log/rabbitmq/rabbit#rabbit1.log
sasl log : /var/log/rabbitmq/rabbit#rabbit1-sasl.log
database dir : /var/lib/rabbitmq/mnesia/rabbit#rabbit1
erlang version : 5.8.5
-- rabbit boot start
starting file handle cache server ...done
starting worker pool ...done
starting database ...BOOT ERROR: FAILED
Reason: function_clause
Stacktrace: [{lists,usort,[{[rabbit#rabbit1,rabbit#rabbit2],disc}]},
{rabbit_mnesia,init_db,3},
{rabbit_mnesia,init,0},
{rabbit,'-run_boot_step/1-lc$^1/1-1-',1},
{rabbit,run_boot_step,1},
{rabbit,'-start/2-lc$^0/1-0-',1},
{rabbit,start,2},
{application_master,start_it_old,4}]
Erlang has closed
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}})
Have any suggestion what's wrong with my rabbit?
Configuration file should be like this:
root#rabbit1:~# cat /etc/rabbitmq/myrabbitmq.config
[{rabbit,
[{cluster_nodes, ['rabbit#rabbit1', 'rabbit#rabbit2'] }]}].
It seems, that disc or ram node configures in different way than in documentation to latest version of rabbit. In this configuration two disc nodes will be created. If somebody wants ram node this node should be ommitted in configuration of this node (not in other config files).