Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building to production fails. #55

Closed
karthikkp opened this issue Jan 14, 2017 · 2 comments
Closed

Building to production fails. #55

karthikkp opened this issue Jan 14, 2017 · 2 comments

Comments

@karthikkp
Copy link

Building production gives a can not find module error. What could be going wrong? I have attached the debug log.

0 info it worked if it ends with ok
1 verbose cli [ '/Users/karthickpriyadarshan/.nvm/versions/node/v6.9.2/bin/node',
1 verbose cli '/Users/karthickpriyadarshan/.nvm/versions/node/v6.9.2/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@3.10.9
3 info using node@v6.9.2
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle op3@3.0.0prebuild: op3@3.0.0
6 silly lifecycle op3@3.0.0
prebuild: no script for prebuild, continuing
7 info lifecycle op3@3.0.0build: op3@3.0.0
8 verbose lifecycle op3@3.0.0
build: unsafe-perm in lifecycle true
9 verbose lifecycle op3@3.0.0build: PATH: /Users/karthickpriyadarshan/.nvm/versions/node/v6.9.2/lib/node_modules/npm/bin/node-gyp-bin:/Users/karthickpriyadarshan/GitHub/yop-v3/node_modules/.bin:/Users/karthickpriyadarshan/.nvm/versions/node/v6.9.2/bin:/usr/pgsql-9.5/bin:/Users/karthickpriyadarshan/.rbenv/shims:/Users/karthickpriyadarshan/.rbenv/bin:/opt/local/bin:/opt/local/sbin:/usr/local/lib/node_modules/grunt/lib:/usr/local/heroku/bin:/usr/local/lib/node_modules/express/bin:/Users/karthickpriyadarshan/Desktop/adt-bundle-mac-x86_64-20140702/sdk/platform-tools:/Users/karthickpriyadarshan/Desktop/adt-bundle-mac-x86_64-20140702/sdk/tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle op3@3.0.0
build: CWD: /Users/karthickpriyadarshan/GitHub/yop-v3
11 silly lifecycle op3@3.0.0build: Args: [ '-c',
11 silly lifecycle 'ng build --env=production --sm=false --aot=true --output-path=dist/client && npm run _server:build' ]
12 silly lifecycle op3@3.0.0
build: Returned: code: 1 signal: null
13 info lifecycle op3@3.0.0~build: Failed to exec build script
14 verbose stack Error: op3@3.0.0 build: ng build --env=production --sm=false --aot=true --output-path=dist/client && npm run _server:build
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/Users/karthickpriyadarshan/.nvm/versions/node/v6.9.2/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/Users/karthickpriyadarshan/.nvm/versions/node/v6.9.2/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid op3@3.0.0
16 verbose cwd /Users/karthickpriyadarshan/GitHub/yop-v3
17 error Darwin 15.4.0
18 error argv "/Users/karthickpriyadarshan/.nvm/versions/node/v6.9.2/bin/node" "/Users/karthickpriyadarshan/.nvm/versions/node/v6.9.2/bin/npm" "run" "build"
19 error node v6.9.2
20 error npm v3.10.9
21 error code ELIFECYCLE
22 error op3@3.0.0 build: ng build --env=production --sm=false --aot=true --output-path=dist/client && npm run _server:build
22 error Exit status 1
23 error Failed at the op3@3.0.0 build script 'ng build --env=production --sm=false --aot=true --output-path=dist/client && npm run _server:build'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the op3 package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ng build --env=production --sm=false --aot=true --output-path=dist/client && npm run _server:build
23 error You can get information on how to open an issue for this project with:
23 error npm bugs op3
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls op3
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

@joandvgv
Copy link

I'm also having similar issues

ERROR in Unexpected value 'null' imported by the module 'AppModule in /home/joandv/angular2-express-starter-master/src/app/app.module.ts' [0] [0] ERROR in ./src/main.ts [0] Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/home/joandv/angular2-express-starter-master/src' [0] @ ./src/main.ts 4:0-74 [0] @ multi main

@wabudd1
Copy link

wabudd1 commented Jan 18, 2017

Potential fix / workaround in this thread

webcrazyman added a commit to webcrazyman/Angular-Express-starter that referenced this issue Jan 19, 2018
HighQualityCode added a commit to HighQualityCode/Angular-Express-Starter that referenced this issue Jan 22, 2018
GustavoReimers pushed a commit to GustavoReimers/Angular_Express_Starter that referenced this issue Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants