.npmrc can make snapcraft build failing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Won't Fix
|
Medium
|
Sergio Schvezov |
Bug Description
The guilty part was a .npmrc (created on some npm call) which was settling in:
prefix=
This one makes the module installed in a different (non snapcraft-related path), and so the build is failing.
-----
I'm trying to use the nodejs webchat example as our base nodejs minimal example.
snapcraft master HEAD at 6d17a601d24b705
examples/webchat$ ../../bin/snapcraft
Pulling webchat
Building webchat
npm install -g
/home/didrocks/
webchat-
├── express@4.13.4 (escape-html@1.0.3, array-flatten@
└── socket.io@1.4.5 (has-binary@0.1.7, debug@2.2.0, socket.
Staging webchat
Stripping webchat
[Errno 2] No such file or directory: '/home/
The issue I guess is coming from:
/home/didrocks/
$ find . -name 'webchat*'
./parts/webchat
./parts/
./webchat.js
(not in install/)
I don't have any local nodejs or npm installed in the PATH, I even removed ~/.node-modules to ensure this wasn't triggering some weird npm behavior.
description: | updated |
summary: |
- nodejs webchat examples doesn't work + .npmrc can make snapcraft build failing |
description: | updated |
Changed in snapcraft: | |
assignee: | nobody → Sergio Schvezov (sergiusens) |
milestone: | none → 2.7 |
importance: | Undecided → Medium |
Changed in snapcraft: | |
milestone: | 2.7 → none |
Changed in snapcraft: | |
status: | New → Triaged |
This problem also affects me.
My .npmrc file is: /home/dawndiy/ .node
```
prefix=
```
Use snapcraft to build this project 'https:/ /github. com/dawndiy/ electronic- wechat- snap'.
------- ------- ---BUILD LOG---- ------- ------- - 4.4-linux- x64.tar. gz'[=== ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ====] 100% min=Infinity install workspace/ ubuntu- snappy/ wechat1/ parts/electroni c-wechat/ src/node_ modules/ electron
Downloading 'node-v4.
npm --cache-
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
-
> electron@1.4.15 postinstall /home/dawndiy/
> node install.js
> nodejieba@2.2.4 install /home/dawndiy/ workspace/ ubuntu- snappy/ wechat1/ parts/electroni c-wechat/ src/node_ modules/ pinyin/ node_modules/ nodejieba
> node-gyp rebuild
make: Entering directory '/home/ dawndiy/ workspace/ ubuntu- snappy/ wechat1/ parts/electroni c-wechat/ src/node_ modules/ pinyin/ node_modules/ nodejieba/ build' obj.target/ nodejieba/ lib/index. o obj.target/ nodejieba/ lib/nodejieba. o MODULE( target) Release/ obj.target/ nodejieba. node nodejieba. node dawndiy/ workspace/ ubuntu- snappy/ wechat1/ parts/electroni c-wechat/ src/node_ modules/ pinyin/ node_modules/ nodejieba/ build' packager@ 7.7.0 node_modules/ electron- packager osx-sign@ 0.3.2 stream@ 1.5.0) info@0. 1.1 (lodash.get@4.4.2, bluebird@3.4.7) absolute@ 1.0.1, jsonfile@2.4.0, graceful-fs@4.1.11, klaw@1.3.1, rimraf@2.5.4) pickle- js@0.2. 0, commander@2.9.0, minimatch@3.0.3, glob@6.0.4, tmp@0.0.28, mkdirp@0.5.1, cuint@0.2.2, mksnapshot@0.3.0) download@ 2.2.1 (path-exists@1.0.0, home-path@1.0.3, rc@1.1.6, mkdirp@0.5.1, mv@2.1.1, nugget@1.6.2) @1.0.2, base64-js@0.0.8, xmldom@0.1.27, xmlbuilder@4.0.0)
CXX(target) Release/
CXX(target) Release/
SOLINK_
COPY Release/
make: Leaving directory '/home/
electron-
├── rcedit@0.5.1
├── run-series@1.1.4
├── minimist@1.2.0
├── electron-
├── debug@2.6.0 (ms@0.7.2)
├── resolve@1.2.0
├── extract-zip@1.6.0 (debug@0.7.4, yauzl@2.4.1, mkdirp@0.5.0, concat-
├── get-package-
├── fs-extra@0.30.0 (path-is-
├── asar@0.12.4 (chromium-
├── electron-
└── plist@1.2.0 (util-deprecate
electron@1.4.15 node_modules/ electron stream@ 1.5.0) download@ 3.2.0 (semver@5.3.0, home-path@1.0.3, minimist@1.2.0, rc@1.1.6, debug@2.6.0, path-exists@2.1.0, sumchecker@1.3.0, fs-extra@0.30.0, nugget@2.0.1)
├── extract-zip@1.6.0 (debug@0.7.4, yauzl@2.4.1, mkdirp@0.5.0, concat-
└── electron-
pinyin@2.8.0 node_modules/pinyin min=Infinity install --global .node/lib/ node_modules/ electronic- wechat/ node_modules/ electron
├── object-assign@4.1.1
├── commander@1.1.1 (keypress@0.1.0)
└── nodejieba@2.2.4 (nan@2.3.5)
npm --cache-
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
-
> electron@1.4.15 postinstall /home/dawndiy/
> node install.js
> nodejieba@2.2.4 install /home/dawndiy/ .node/lib/ node_modules/ electronic- wechat/ node_modules/ pinyin/ node_modules/ nodejieba
> node-gyp rebuild
make: Entering directory '/home/ dawndiy/ .node/lib/ node_modules/ electronic- wechat/ node_modules/ pinyin/ node_modules/ nodejieba/ build' obj.target/ nodejieba/ lib/index. o obj.target/ nodejieba/ lib/nodejieba. o MODULE( target) ...
CXX(target) Release/
CXX(target) Release/
SOLINK_