After installing the angular-cli, when I run ng serve, ng help, and ng version I get the 'AssetUrl' error listed at the bottom)
Windows 8
Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here:
node v6.1.0
npm v3.8.6
error on ng version:
Cannot read property 'AssetUrl' of undefined
TypeError: Cannot read property 'AssetUrl' of undefined
at Object.
ode_modules\@angular\compiler-cli\src\private_import_compiler.js
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\@angular\compiler-cli\src\reflector_host.js:13:33)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\@angular\compiler-cli\src\path_mapped_reflector_host
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\@angular\compiler-cli\src\codegen.js:16:36)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\@angular\compiler-cli\index.js:12:17)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\@ngtools\webpack\src\plugin.js:6:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\@ngtools\webpack\src\index.js:6:10)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\angular-cli\models\webpack-build-typescript.js:5:17)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\angular-cli\models\webpack-config.js:2:34)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\angular-cli\tasks\build-webpack.js:6:24)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.
ode_modules\angular-cli\commands\build.js:3:23)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Class.module.exports.includedCommands (c:\Users\SCoon\Doc
ont-end\libationsnode_modules\angular-cli\addon\index.js:21:16)
at c:\Users\SCoon\Documents\libdev\front-end\libations\node_
cli\lib\models\project.js:392:61
at Array.forEach (native)
at Project.addonCommands (c:\Users\SCoon\Documents\libdev\fr
snode_modules\angular-cli\lib\models\project.js:391:15)
at Project.eachAddonCommand (c:\Users\SCoon\Documents\libdev
ionsnode_modules\angular-cli\lib\models\project.js:426:30)
at module.exports (c:\Users\SCoon\Documents\libdev\front-end
modules\angular-cli\lib\cli\lookup-command.js:33:13)
at CLI.
_modules\angular-cli\lib\cli\cli.js:34:26)
at tryCatch (c:\Users\SCoon\Documents\libdev\front-end\libat
s\rsvp\dist\rsvp.js:538:12)
at invokeCallback (c:\Users\SCoon\Documents\libdev\front-end
modules\rsvp\dist\rsvp.js:553:13)
at publish (c:\Users\SCoon\Documents\libdev\front-end\libati
\rsvp\dist\rsvp.js:521:7)
at flush (c:\Users\SCoon\Documents\libdev\front-end\libation
svp\dist\rsvp.js:2373:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7
at process._tickCallback (internal/process/next_tick.js:98:9
Seeing this on OSX El Capitan
NPM 3.10.7
Node 6.6.0
I've got rid of the problem after updating to 1.0.0-beta.18 (at least on Windows OS machine)
Same here
Windows 10, 1.0.0-beta.18. If i do a new project it works great. If I run an existing project (https://github.com/jelbourn/material2-app) it is tossing this error message.
Install angular-cli 1.0.0-beta.18, solved "Cannot read property 'AssetUrl' of undefined" to me
same error
I fixed this issue on Windows 10 by running the ng command from an elevated command prompt.
I was able to work around this in [email protected] by doing a global replace in node_modules/@angular/compiler-cli/src/private_import_compiler.js
before: __compiler_private__.
after:
in other words remove every occurrence of the before string.
No warranty expressed or implied. This is probably a bad thing to do, but I was able to get material2-app-master running with the above.
Just to confirm, on macOS Sierra with Node 6.4 I'm having the same problem, and the hack from @chrishandorf has me moving again.
I have the same issue after upgrading to newest version (19-3)
Guys remove completly global'y and locally and reinstall it with latest 19-3 because beta18 gave me this error but now new release it's ok to me !
@chrishandorf comment got me going. Did a find and replace with compiler_private. to ''
I have solved the problem by reinstalling everything. I think the problem
occurs when using npm install after ng init
2016-11-03 11:50 GMT+01:00 Nathan Thomas [email protected]:
@chrishandorf https://github.com/chrishandorf comment got me going. Did
a find and replace with _compiler_private_. to ''—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular-cli/issues/2834#issuecomment-258111801,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQ8j8qErJGUikubABxw8wIMU8QphvqZZks5q6byBgaJpZM4Kd8k7
.
This was related to a version mismatch. Reinstalling stuff should solve it.
You have to update the package.json in material2-app-master to @angular/[email protected] to solve this. Also mkdir src/assets.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
I was able to work around this in [email protected] by doing a global replace in node_modules/@angular/compiler-cli/src/private_import_compiler.js
in other words remove every occurrence of the before string.
No warranty expressed or implied. This is probably a bad thing to do, but I was able to get material2-app-master running with the above.