[x ] Bug Report
[ ] Feature Request
When running the tool I encounter a file not found error. It's looking for a _packages_ directory under the @angular scope that doesn't exist. I don't see what's triggering it to look there.
Create a 'Hello World' application using @angular-cli and @angular/material libraries. Run the ng-packagr command.
@angular/cli : https://cli.angular.io/
@angular/material : https://material.angular.io/guide/getting-started
ng-packagr: 1.4.0
@angular/cli: 1.4.5
node: 7.2.1
os: win32 x64
@angular/animations: 4.4.4
@angular/cdk: 2.0.0-beta.12-7fe1b81
@angular/common: 4.4.4
@angular/compiler: 4.4.4
@angular/core: 4.4.4
@angular/flex-layout: 2.0.0-beta.9-c3c7151
@angular/forms: 4.4.4
@angular/http: 4.4.4
@angular/material: 2.0.0-beta.12-7fe1b81
@angular/platform-browser: 4.4.4
@angular/platform-browser-dynamic: 4.4.4
@angular/router: 4.4.4
@angular/cli: 1.4.5
@angular/compiler-cli: 4.4.4
@angular/language-service: 4.4.4
typescript: 2.5.3
ng-packagr -p ng-package.json -g
Building Angular library
'LOCALE_ID' is imported from external module '@angular/core' but never used
'HAMMER_GESTURE_CONFIG' is imported from external module '@angular/platform-browser' but never used
'ARIA_DESCRIBER_PROVIDER' and 'LIVE_ANNOUNCER_PROVIDER' are imported from external module '@angular/cdk/a11y' but never used
'VIEWPORT_RULER_PROVIDER' is imported from external module '@angular/cdk/overlay' but never used
'PortalModule' is imported from external module '@angular/cdk/portal' but never used
'UNIQUE_SELECTION_DISPATCHER_PROVIDER' is imported from external module '@angular/cdk/collections' but never used
'VIEWPORT_RULER_PROVIDER' is imported from external module '@angular/cdk/scrolling' but never used
'CdkTableModule' is imported from external module '@angular/cdk/table' but never used
'CdkStepperModule' is imported from external module '@angular/cdk/stepper' but never used
BUILD ERROR
ENOENT: no such file or directory, open 'C:\src\git\web-wrapper\node_modules\@angular\packages\material\esm5\autocomplete\autocomplete.js.map'
Error: ENOENT: no such file or directory, open 'C:\src\git\web-wrapper\node_modules\@angular\packages\material\esm5\autocomplete\autocomplete.js.map'
npm verb lifecycle [email protected]~build-npm: unsafe-perm in lifecycle true
npm verb lifecycle [email protected]~build-npm: PATH: C:\Users\bohling.denver\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\src\git\web-wrapper\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\Syste
m32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Subversion\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.8.0_91\bin;C:\Program Files\nodejs\;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windo
ws\System32\WindowsPowerShell\v1.0\;C:\Users\bohling.denver\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\bohling.denver\AppData\Local\Programs\Python\Python35-32\;C:\Users\bohling.denver\AppData\Roaming\npm;C:\Users\bohling.denver\AppData\Roaming\np
m\node_modules\ng-packagr\lib
npm verb lifecycle [email protected]~build-npm: CWD: C:\src\git\web-wrapper
npm info lifecycle [email protected]~build-npm: Failed to exec build-npm script
npm verb stack Error: [email protected] build-npm: `ng-packagr -p ng-package.json -g`
npm verb stack Exit status 111
npm verb stack at EventEmitter.<anonymous> (C:\Users\bohling.denver\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
npm verb stack at emitTwo (events.js:106:13)
npm verb stack at EventEmitter.emit (events.js:191:7)
npm verb stack at ChildProcess.<anonymous> (C:\Users\bohling.denver\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
npm verb stack at emitTwo (events.js:106:13)
npm verb stack at ChildProcess.emit (events.js:191:7)
npm verb stack at maybeClose (internal/child_process.js:885:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm verb pkgid [email protected]
npm verb cwd C:\src\git\web-wrapper
npm verb Windows_NT 6.1.7601
npm verb argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\bohling.denver\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-npm" "--verbose"
npm verb node v7.2.1
npm verb npm v5.4.2
npm ERR! code ELIFECYCLE
npm ERR! errno 111
npm ERR! [email protected] build-npm: `ng-packagr -p ng-package.json -g`
npm ERR! Exit status 111
npm ERR!
npm ERR! Failed at the [email protected] build-npm script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 111, true ]
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\bohling.denver\AppData\Roaming\npm-cache\_logs\2017-10-10T23_48_49_662Z-debug.log
This is actually a known issue in @angular/[email protected]. If you downgrade to @angular/[email protected], the problem should go away.
Thanks @DavidParks8 for the reference.
Following the suggestion on the thread to list it as an external dependency the ng-package.json _lib_ section allowed me to package even while using @angular/[email protected] since it doesn't try to include it in the bundle.
{
"lib": {
"entryFile": ...,
"externals": {
"@angular/material": "ng.material"
}
}
Getting same error with @angular/[email protected]. Downgrade is not possible as Angular 5 as require at-least @angular/[email protected]. @denver-HJS's solution didn't work.
@denver-HJS's solution worked for me with angular 5.1.3 (requested ^5.0.0)
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
_This action has been performed automatically by a bot._
Most helpful comment
Thanks @DavidParks8 for the reference.
Following the suggestion on the thread to list it as an external dependency the
ng-package.json_lib_ section allowed me to package even while using@angular/[email protected]since it doesn't try to include it in the bundle.