angular-cli: Cannot find module 'reflect-metadata'
OS
Windows10
Versions.
If run
ng --version
. Then give error : Cannot find module ‘reflect-metadata’
Node versions:v4.5.0
Repro steps.
run
npm install angular-cli -g
Error on thisng new hello
Thanks
The log file is following.
0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘install’,
1 verbose cli ‘-g’,
1 verbose cli ‘reflect-metadata’ ]
2 info using npm@2.15.9
3 info using node@v4.5.0
4 verbose install initial load of C:\Users\UZAIR\AppData\Roaming\npm\package.json
5 verbose readDependencies loading dependencies from C:\Users\UZAIR\AppData\Roaming\npm\package.json
6 silly cache add args [ ‘reflect-metadata’, null ]
7 verbose cache add spec reflect-metadata
8 silly cache add parsed spec Result {
8 silly cache add raw: ‘reflect-metadata’,
8 silly cache add scope: null,
8 silly cache add name: ‘reflect-metadata’,
8 silly cache add rawSpec: ‘’,
8 silly cache add spec: ‘latest’,
8 silly cache add type: ‘tag’ }
9 silly addNamed reflect-metadata@latest
10 verbose addNamed “latest” is being treated as a dist-tag for reflect-metadata
11 info addNameTag [ ‘reflect-metadata’, ‘latest’ ]
12 silly mapToRegistry name reflect-metadata
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry data Result {
15 silly mapToRegistry raw: ‘reflect-metadata’,
15 silly mapToRegistry scope: null,
15 silly mapToRegistry name: ‘reflect-metadata’,
15 silly mapToRegistry rawSpec: ‘’,
15 silly mapToRegistry spec: ‘latest’,
15 silly mapToRegistry type: ‘tag’ }
16 silly mapToRegistry uri https://registry.npmjs.org/reflect-metadata
17 verbose addNameTag registry:https://registry.npmjs.org/reflect-metadata not in flight; fetching
18 verbose request uri https://registry.npmjs.org/reflect-metadata
19 verbose request no auth needed
20 info attempt registry request try #1 at 1:58:49 PM
21 verbose request id cffd0e6fc6f18695
22 verbose etag “3FUNPAFFOC9BUD78M5LTTM94C”
23 http request GET https://registry.npmjs.org/reflect-metadata
24 http 304 https://registry.npmjs.org/reflect-metadata
25 verbose headers { date: ‘Wed, 05 Oct 2016 08:58:58 GMT’,
25 verbose headers via: ‘1.1 varnish’,
25 verbose headers ‘cache-control’: ‘max-age=300’,
25 verbose headers etag: ‘“3FUNPAFFOC9BUD78M5LTTM94C”’,
25 verbose headers age: ‘219’,
25 verbose headers connection: ‘keep-alive’,
25 verbose headers ‘x-served-by’: ‘cache-lhr6337-LHR’,
25 verbose headers ‘x-cache’: ‘HIT’,
25 verbose headers ‘x-cache-hits’: ‘204’,
25 verbose headers ‘x-timer’: ‘S1475657938.353556,VS0,VE0’,
25 verbose headers vary: ‘Accept-Encoding’ }
26 silly get cb [ 304,
26 silly get { date: ‘Wed, 05 Oct 2016 08:58:58 GMT’,
26 silly get via: ‘1.1 varnish’,
26 silly get ‘cache-control’: ‘max-age=300’,
26 silly get etag: ‘“3FUNPAFFOC9BUD78M5LTTM94C”’,
26 silly get age: ‘219’,
26 silly get connection: ‘keep-alive’,
26 silly get ‘x-served-by’: ‘cache-lhr6337-LHR’,
26 silly get ‘x-cache’: ‘HIT’,
26 silly get ‘x-cache-hits’: ‘204’,
26 silly get ‘x-timer’: ‘S1475657938.353556,VS0,VE0’,
26 silly get vary: ‘Accept-Encoding’ } ]
27 verbose etag https://registry.npmjs.org/reflect-metadata from cache
28 verbose get saving reflect-metadata to C:\Users\UZAIR\AppData\Roaming\npm-cache\registry.npmjs.org\reflect-metadata.cache.json
29 verbose correctMkdir C:\Users\UZAIR\AppData\Roaming\npm-cache correctMkdir not in flight; initializing
30 silly addNameTag next cb for reflect-metadata with tag latest
31 silly addNamed reflect-metadata@0.1.8
32 verbose addNamed “0.1.8” is a plain semver version for reflect-metadata
33 silly cache afterAdd reflect-metadata@0.1.8
34 verbose afterAdd C:\Users\UZAIR\AppData\Roaming\npm-cache\reflect-metadata\0.1.8\package\package.json not in flight; writing
35 verbose correctMkdir C:\Users\UZAIR\AppData\Roaming\npm-cache correctMkdir not in flight; initializing
36 verbose afterAdd C:\Users\UZAIR\AppData\Roaming\npm-cache\reflect-metadata\0.1.8\package\package.json written
37 silly install resolved [ { name: ‘reflect-metadata’,
37 silly install resolved version: ‘0.1.8’,
37 silly install resolved description: ‘Polyfill for Metadata Reflection API’,
37 silly install resolved main: ‘Reflect.js’,
37 silly install resolved typings: ‘typings.d.ts’,
37 silly install resolved typescript: { definition: ‘Reflect.d.ts’ },
37 silly install resolved scripts:
37 silly install resolved { prepublish: ‘npm run test’,
37 silly install resolved build: ‘tsc’,
37 silly install resolved ‘build-test’: ‘tsc --project ./test/’,
37 silly install resolved test: ‘npm run build & npm run build-test & node ./temp/test/run.js’ },
37 silly install resolved repository:
37 silly install resolved { type: ‘git’,
37 silly install resolved url: ‘git+https://github.com/rbuckton/ReflectDecorators.git’ },
37 silly install resolved keywords: [ ‘decorator’, ‘metadata’, ‘javascript’, ‘reflect’ ],
37 silly install resolved author:
37 silly install resolved { name: ‘Ron Buckton’,
37 silly install resolved email: ‘ron.buckton@microsoft.com’,
37 silly install resolved url: ‘http://github.com/rbuckton’ },
37 silly install resolved licenses: [ [Object] ],
37 silly install resolved license: ‘Apache-2.0’,
37 silly install resolved bugs: { url: ‘https://github.com/rbuckton/ReflectDecorators/issues’ },
37 silly install resolved homepage: ‘http://rbuckton.github.io/ReflectDecorators’,
37 silly install resolved dependencies: {},
37 silly install resolved devDependencies: { typescript: ‘^1.7.5’ },
37 silly install resolved gitHead: ‘d737a908100aa8ca7f083f815f06875cb80a217e’,
37 silly install resolved _id: ‘reflect-metadata@0.1.8’,
37 silly install resolved _shasum: ‘72426d570b60776e3688968bd5ab9537a15cecf6’,
37 silly install resolved _from: ‘reflect-metadata@latest’,
37 silly install resolved _npmVersion: ‘3.4.0’,
37 silly install resolved _nodeVersion: ‘6.0.0’,
37 silly install resolved _npmUser: { name: ‘rbuckton’, email: ‘rbuckton@chronicles.org’ },
37 silly install resolved dist:
37 silly install resolved { shasum: ‘72426d570b60776e3688968bd5ab9537a15cecf6’,
37 silly install resolved tarball: ‘https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.8.tgz’ },
37 silly install resolved maintainers: [ [Object] ],
37 silly install resolved _npmOperationalInternal:
37 silly install resolved { host: ‘packages-16-east.internal.npmjs.com’,
37 silly install resolved tmp: ‘tmp/reflect-metadata-0.1.8.tgz_1470784336772_0.628053993685171’ },
37 silly install resolved directories: {},
37 silly install resolved _resolved: ‘https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.8.tgz’,
37 silly install resolved readme: ‘ERROR: No README data found!’ } ]
38 info install reflect-metadata@0.1.8 into C:\Users\UZAIR\AppData\Roaming\npm
39 info installOne reflect-metadata@0.1.8
40 verbose installOne of reflect-metadata to C:\Users\UZAIR\AppData\Roaming\npm not in flight; installing
41 verbose correctMkdir C:\Users\UZAIR\AppData\Roaming\npm-cache_locks correctMkdir not in flight; initializing
42 verbose lock using C:\Users\UZAIR\AppData\Roaming\npm-cache_locks\reflect-metadata-8e361738d35d115d.lock for C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata
43 silly install write writing reflect-metadata 0.1.8 to C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata
44 verbose unbuild node_modules\reflect-metadata
45 silly gentlyRm C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata is being purged from base C:\Users\UZAIR\AppData\Roaming\npm
46 verbose gentlyRm don’t care about contents; nuking C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata
47 verbose tar unpack C:\Users\UZAIR\AppData\Roaming\npm-cache\reflect-metadata\0.1.8\package.tgz
48 verbose tar unpacking to C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata
49 silly gentlyRm C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata is being purged
50 verbose gentlyRm don’t care about contents; nuking C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata
51 silly gunzTarPerm modes [ ‘777’, ‘666’ ]
52 silly gunzTarPerm extractEntry package.json
53 silly gunzTarPerm extractEntry .npmignore
54 silly gunzTarPerm extractEntry README.md
55 silly gunzTarPerm extractEntry LICENSE
56 silly gunzTarPerm extractEntry Reflect.js
57 silly gunzTarPerm extractEntry bower.json
58 silly gunzTarPerm extractEntry Reflect.js.map
59 silly gunzTarPerm extractEntry Reflect.ts
60 silly gunzTarPerm extractEntry CopyrightNotice.txt
61 silly gunzTarPerm extractEntry typings/node.d.ts
62 silly gunzTarPerm extractEntry Reflect.d.ts
63 silly gunzTarPerm extractEntry reflect-metadata.d.ts
64 silly gunzTarPerm extractEntry spec/biblio.json
65 silly gunzTarPerm extractEntry spec/css/elements.css
66 silly gunzTarPerm extractEntry spec/index-out.html
67 silly gunzTarPerm extractEntry spec/index.html
68 silly gunzTarPerm extractEntry spec/metadata.md
69 silly gunzTarPerm extractEntry spec/typescript-out.html
70 silly gunzTarPerm extractEntry spec/typescript.html
71 silly gunzTarPerm extractEntry temp/Reflect.js
72 silly gunzTarPerm extractEntry temp/Reflect.d.ts
73 silly gunzTarPerm extractEntry temp/Reflect.js.map
74 silly gunzTarPerm extractEntry temp/test/harness.js
75 silly gunzTarPerm extractEntry temp/test/run.js
76 silly gunzTarPerm extractEntry temp/test/spec.js
77 silly gunzTarPerm extractEntry temp/test/harness.d.ts
78 silly gunzTarPerm extractEntry temp/test/harness.js.map
79 silly gunzTarPerm extractEntry temp/test/reflect/reflect-metadata.js
80 silly gunzTarPerm extractEntry temp/test/reflect/reflect-deletemetadata.js
81 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getmetadata.js
82 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getmetadatakeys.js
83 silly gunzTarPerm extractEntry temp/test/reflect/reflect-definemetadata.js
84 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getownmetadata.js
85 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getownmetadatakeys.js
86 silly gunzTarPerm extractEntry temp/test/reflect/reflect-hasmetadata.js
87 silly gunzTarPerm extractEntry temp/test/reflect/reflect-hasownmetadata.js
88 silly gunzTarPerm extractEntry temp/test/reflect/reflect-decorate.js
89 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getownmetadata.d.ts
90 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getmetadata.js.map
91 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getmetadatakeys.d.ts
92 silly gunzTarPerm extractEntry temp/test/reflect/reflect-decorate.d.ts
93 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getmetadatakeys.js.map
94 silly gunzTarPerm extractEntry temp/test/reflect/reflect-definemetadata.js.map
95 silly gunzTarPerm extractEntry temp/test/reflect/reflect-deletemetadata.d.ts
96 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getownmetadata.js.map
97 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getownmetadatakeys.d.ts
98 silly gunzTarPerm extractEntry temp/test/reflect/reflect-decorate.js.map
99 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getownmetadatakeys.js.map
100 silly gunzTarPerm extractEntry temp/test/reflect/reflect-hasmetadata.d.ts
101 silly gunzTarPerm extractEntry temp/test/reflect/reflect-deletemetadata.js.map
102 silly gunzTarPerm extractEntry temp/test/reflect/reflect-hasmetadata.js.map
103 silly gunzTarPerm extractEntry temp/test/reflect/reflect-hasownmetadata.d.ts
104 silly gunzTarPerm extractEntry temp/test/reflect/reflect-getmetadata.d.ts
105 silly gunzTarPerm extractEntry temp/test/reflect/reflect-hasownmetadata.js.map
106 silly gunzTarPerm extractEntry temp/test/reflect/reflect-metadata.d.ts
107 silly gunzTarPerm extractEntry temp/test/reflect/reflect-definemetadata.d.ts
108 silly gunzTarPerm extractEntry temp/test/reflect/reflect-metadata.js.map
109 silly gunzTarPerm extractEntry temp/test/run.d.ts
110 silly gunzTarPerm extractEntry temp/test/run.js.map
111 silly gunzTarPerm extractEntry temp/test/spec.d.ts
112 silly gunzTarPerm extractEntry temp/test/spec.js.map
113 silly gunzTarPerm extractEntry test/harness.ts
114 silly gunzTarPerm extractEntry test/reflect/reflect-decorate.ts
115 silly gunzTarPerm extractEntry test/reflect/reflect-definemetadata.ts
116 silly gunzTarPerm extractEntry test/reflect/reflect-deletemetadata.ts
117 silly gunzTarPerm extractEntry test/reflect/reflect-getmetadata.ts
118 silly gunzTarPerm extractEntry test/reflect/reflect-getmetadatakeys.ts
119 silly gunzTarPerm extractEntry test/reflect/reflect-getownmetadata.ts
120 silly gunzTarPerm extractEntry test/reflect/reflect-getownmetadatakeys.ts
121 silly gunzTarPerm extractEntry test/reflect/reflect-hasmetadata.ts
122 silly gunzTarPerm extractEntry test/reflect/reflect-hasownmetadata.ts
123 silly gunzTarPerm extractEntry test/reflect/reflect-metadata.ts
124 silly gunzTarPerm extractEntry test/run.ts
125 silly gunzTarPerm extractEntry test/spec.ts
126 silly gunzTarPerm extractEntry test/tsconfig.json
127 silly gunzTarPerm extractEntry tsconfig.json
128 silly gunzTarPerm extractEntry typings.d.ts
129 verbose write writing to C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata\package.json
130 info preinstall reflect-metadata@0.1.8
131 verbose readDependencies loading dependencies from C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata\package.json
132 verbose readDependencies loading dependencies from C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata\package.json
133 silly install resolved []
134 verbose about to build C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata
135 info build C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata
136 info linkStuff reflect-metadata@0.1.8
137 silly linkStuff reflect-metadata@0.1.8 has C:\Users\UZAIR\AppData\Roaming\npm\node_modules as its parent node_modules
138 silly linkStuff reflect-metadata@0.1.8 is part of a global install
139 silly linkStuff reflect-metadata@0.1.8 is installed into a global node_modules
140 silly linkStuff reflect-metadata@0.1.8 is installed into the top-level global node_modules
141 verbose linkBins reflect-metadata@0.1.8
142 verbose linkMans reflect-metadata@0.1.8
143 verbose rebuildBundles reflect-metadata@0.1.8
144 info install reflect-metadata@0.1.8
145 info postinstall reflect-metadata@0.1.8
146 verbose unlock done using C:\Users\UZAIR\AppData\Roaming\npm-cache_locks\reflect-metadata-8e361738d35d115d.lock for C:\Users\UZAIR\AppData\Roaming\npm\node_modules\reflect-metadata
147 verbose validateInstall loading C:\Users\UZAIR\AppData\Roaming\npm\package.json for validation
148 verbose stack Error: The package webpack@2.1.0-beta.22 does not satisfy its siblings’ peerDependencies requirements!
148 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install.js:125:32
148 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install.js:268:7
148 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-installed\read-installed.js:142:5
148 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-installed\read-installed.js:263:14
148 verbose stack at cb (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:47:24)
148 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-installed\read-installed.js:263:14
148 verbose stack at cb (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:47:24)
148 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-installed\read-installed.js:263:14
148 verbose stack at cb (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:47:24)
148 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-installed\read-installed.js:263:14
149 verbose cwd D:
150 error Windows_NT 10.0.14393
151 error argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “-g” “reflect-metadata”
152 error node v4.5.0
153 error npm v2.15.9
154 error code EPEERINVALID
155 error peerinvalid The package webpack@2.1.0-beta.22 does not satisfy its siblings’ peerDependencies requirements!
155 error peerinvalid Peer html-webpack-plugin@2.22.0 wants webpack@*
155 error peerinvalid Peer karma-webpack@1.8.0 wants webpack@^1.1.0 || ^2 || ^2.1.0-beta
155 error peerinvalid Peer sass-loader@3.2.3 wants webpack@^1.12.6 || ^2.1.0-beta
155 error peerinvalid Peer string-replace-loader@1.0.5 wants webpack@1 || 2 || ^2.0.0-beta || ^2.1.0-beta
155 error peerinvalid Peer webpack-dev-server@2.1.0-beta.3 wants webpack@^2.1.0-beta
156 verbose exit [ 1, true ]
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 6
- Comments: 26 (1 by maintainers)
Worked for me thanks . these spets:
I had the same error, i install globally for the command
ng new myApp
with the commandnpm i -g reflect-metadata
npm i -g portfinder
and so the ng new myApp work, then for the ng serve or ng --version i run the command without the -gnpm i reflect-metadata
npm i portfinder
worked for meThe workaround worked after
npm install -g reflect-metadata
ANDnpm install -g portfinder
for me, but this is still a workaround. This souldn’t be done manually. It should be fixed soon.@invious please go into the project dir and do a:
npm i reflect-metadata
w/o -gthis issue still reproduce, to avoid it we have to use workaround with “npm i -g reflect-metadata” so … the question why this issue are closed ?
I installed the package globally and tadaaa it works! (Not sure this is the cleanest solution but it works)
Just type
npm i -g reflect-metadata
my issue is solved using update npm version 2 to 3 and update angular-cli globally.