I am trying to use snap for the first time to package a NodeJS app. Everything seems pretty simple except that symlinks are broken in the stage and prime step because a build folder is not copied during from the parts folder.
name: chuck
version: test
summary: Command line weather tool.
confinement: devmode
description: foobar
parts:
command:
plugin: nodejs
node-engine: 8.12.0
source: .
build-packages:
- python
- build-essential
apps:
chuck:
command: bin/chuck
root@7241861fba6e:/tmp/app# tree -L 3 parts
parts
βββ command
βββ build
β βββ LICENSE
β βββ README.md
β βββ app.js
β βββ ci_scripts
β βββ config
β βββ dist
β βββ gulpfile.js
β βββ lib
β βββ node_modules
β βββ package-lock.json
β βββ package.json
β βββ scripts
β βββ test
β βββ tsconfig.json
βββ install
β βββ CHANGELOG.md
β βββ LICENSE
β βββ README.md
β βββ bin
β βββ include
β βββ lib
β βββ share
βββ npm
β βββ node-v8.12.0-linux-x64.tar.gz
βββ src
β βββ LICENSE
β βββ README.md
β βββ app.js
β βββ ci_scripts
β βββ config
β βββ dist
β βββ gulpfile.js
β βββ lib
β βββ node_modules
β βββ package-lock.json
β βββ package.json
β βββ scripts
β βββ test
β βββ tsconfig.json
βββ state
βββ build
βββ prime
βββ pull
βββ stage
root@7241861fba6e:/tmp/app# tree -L 3 stage
stage
βββ CHANGELOG.md
βββ LICENSE
βββ README.md
βββ bin
β βββ mfp_executive -> ../lib/node_modules/@sixriver/mfp_executive/dist/lib/app.js
β βββ node
β βββ npm -> ../lib/node_modules/npm/bin/npm-cli.js
β βββ npx -> ../lib/node_modules/npm/bin/npx-cli.js
βββ include
β βββ node
β βββ android-ifaddrs.h
β βββ common.gypi
β βββ config.gypi
β βββ libplatform
β βββ node.h
β βββ node_api.h
β βββ node_api_types.h
β βββ node_buffer.h
β βββ node_object_wrap.h
β βββ node_version.h
β βββ openssl
β βββ pthread-barrier.h
β βββ stdint-msvc2008.h
β βββ tree.h
β βββ uv-aix.h
β βββ uv-bsd.h
β βββ uv-darwin.h
β βββ uv-errno.h
β βββ uv-linux.h
β βββ uv-os390.h
β βββ uv-posix.h
β βββ uv-sunos.h
β βββ uv-threadpool.h
β βββ uv-unix.h
β βββ uv-version.h
β βββ uv-win.h
β βββ uv.h
β βββ v8-debug.h
β βββ v8-inspector-protocol.h
β βββ v8-inspector.h
β βββ v8-platform.h
β βββ v8-profiler.h
β βββ v8-testing.h
β βββ v8-util.h
β βββ v8-value-serializer-version.h
β βββ v8-version-string.h
β βββ v8-version.h
β βββ v8.h
β βββ v8config.h
β βββ zconf.h
β βββ zlib.h
βββ lib
β βββ node_modules
β βββ @sixriver
β βββ npm
βββ share
βββ doc
β βββ node
βββ man
β βββ man1
βββ systemtap
βββ tapset
So my question is what am I doing wrong⦠it seems to expect that the build directory would be there, but its unclear why in my simple case it is not when it has what seems to be all the important information.
Is this possibly a bug in the nodejs snapcraft plugin? Or does it have something to do with my setup specfifically?