New build from master

I was in the process of bringing up a new server from the master. I was running the command npm run build. This is the error message that I am getting. How do I get around this to complete the install? Thanks!

    [OpenEMR] An error occured! Check the log for details.
    Error in plugin "gulp-dart-sass"
    Message:
    interface/themes/misc/bootstrap_navbar.scss
    Error: Can't find stylesheet to import.
    ╷
    22 │ @import "../../../public/assets/bootstrap/scss/vendor/rfs";
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    interface/themes/misc/bootstrap_navbar.scss 22:9  root stylesheet
    Details:
    formatted: Error: Can't find stylesheet to import.
    ╷
    22 │ @import "../../../public/assets/bootstrap/scss/vendor/rfs";
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    interface/themes/misc/bootstrap_navbar.scss 22:9  root stylesheet
    line: 22
    column: 9
    file: /var/www/html/boss/interface/themes/misc/bootstrap_navbar.scss
    status: 1
    messageFormatted: interface/themes/misc/bootstrap_navbar.scss
    Error: Can't find stylesheet to import.
    ╷
    22 │ @import "../../../public/assets/bootstrap/scss/vendor/rfs";
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    interface/themes/misc/bootstrap_navbar.scss 22:9  root stylesheet
    messageOriginal: Can't find stylesheet to import.
    ╷
    22 │ @import "../../../public/assets/bootstrap/scss/vendor/rfs";
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    interface/themes/misc/bootstrap_navbar.scss 22:9  root stylesheet
    relativePath: interface/themes/misc/bootstrap_navbar.scss

hi @juggernautsei ,
What nodejs version are you using?
node --version

@brady.miller The version is 10.19.0 that is installed now.

@juggernautsei , pretty sure 10.* won’t work anymore. Rec 14.* (I think 12.* should also work). I will update the README for this.

@brady, thank for the reply but 14.17.0 does not work either. I went down to 6.x and 10.x and now 14.x and I still receive the same error message. I will try installing 12.

Just tested 14.x to work on my environment. Rec removing vendor directory and node_modules directory and doing:

composer install --no-dev
npm install
npm run build
composer dump-autoload -o

Should I be concerned about the err at the end?

	ubuntu@ip-172-31-15-114:/var/www/html/boss$ npm install

	> openemr-interface@0.2.0 postinstall /var/www/html/boss
	> napa && gulp -i

	info download https://github.com/PerseusTheGreat/bootstrap-4-rtl/archive/096d40fef7de0128dbaea9edd106a4d551e761a5.zip into bootstrap-rtl
	info download https://github.com/PawelDecowski/jquery-creditcardvalidator/archive/v1.1.0.tar.gz into jquery-creditcardvalidator
	info download https://github.com/eduardomb/jquery-panelslider/archive/1.0.0.tar.gz into jquery-panelslider
	info download https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip into jquery-ui
	info download https://jqueryui.com/resources/download/jquery-ui-themes-1.12.1.zip into jquery-ui-themes
	info git https://github.com/pHAlkaline/summernote-plugins into summernote-nugget
	info download https://github.com/literallycanvas/literallycanvas/archive/v0.4.14.tar.gz into literallycanvas
	info download https://github.com/facebook/react/releases/download/v15.1.0/react-15.1.0.zip into react

	Copying OpenEMR dependencies using Gulp

	[09:11:45] Using gulpfile /var/www/html/boss/gulpfile.js
	[09:11:45] Starting 'default'...
	[09:11:45] Starting 'install'...
	[OpenEMR] Running OpenEMR gulp install task...
	[OpenEMR] Finished running OpenEMR gulp install task
	[09:11:45] Finished 'install' after 80 ms
	[09:11:45] Finished 'default' after 82 ms
	events.js:353
		  throw er; // Unhandled 'error' event
		  ^

	Error: EACCES: permission denied, mkdir '/var/www/html/boss/public/assets/bootstrap'
	Emitted 'error' event on Domain instance at:
		at Pumpify.emit (domain.js:520:12)
		at Pumpify.onerror (/var/www/html/boss/node_modules/readable-stream/lib/_stream_readable.js:640:52)
		at Pumpify.emit (events.js:376:20)
		at Pumpify.emit (domain.js:470:12)
		at Pumpify.Duplexify._destroy (/var/www/html/boss/node_modules/duplexify/index.js:191:15)
		at /var/www/html/boss/node_modules/duplexify/index.js:182:10
		at processTicksAndRejections (internal/process/task_queues.js:77:11) {
	  errno: -13,
	  code: 'EACCES',
	  syscall: 'mkdir',
	  path: '/var/www/html/boss/public/assets/bootstrap',
	  domainEmitter: Pumpify {
		_readableState: ReadableState {
		  objectMode: true,
		  highWaterMark: 16,
		  buffer: BufferList { head: null, tail: null, length: 0 },
		  length: 0,
		  pipes: WriteStream {
			_writableState: WritableState {
			  objectMode: true,
			  highWaterMark: 16,
			  finalCalled: false,
			  needDrain: false,
			  ending: false,
			  ended: false,
			  finished: false,
			  destroyed: false,
			  decodeStrings: true,
			  defaultEncoding: 'utf8',
			  length: 0,
			  writing: false,
			  corked: 0,
			  sync: true,
			  bufferProcessing: false,
			  onwrite: [Function (anonymous)],
			  writecb: null,
			  writelen: 0,
			  bufferedRequest: null,
			  lastBufferedRequest: null,
			  pendingcb: 0,
			  prefinished: false,
			  errorEmitted: false,
			  bufferedRequestCount: 0,
			  corkedRequestsFree: CorkedRequest {
				next: null,
				entry: null,
				finish: [Function (anonymous)]
			  }
			},
			writable: true,
			_events: [Object: null prototype] {
			  unpipe: [Function: onunpipe],
			  drain: [Function (anonymous)],
			  error: [Function: onerror],
			  close: [Function: bound onceWrapper] {
				listener: [Function: onclose]
			  },
			  finish: [Function: bound onceWrapper] {
				listener: [Function: onfinish]
			  }
			},
			_eventsCount: 5,
			_maxListeners: undefined,
			_worker: [Function: sinker],
			_flush: null,
			[Symbol(kCapture)]: false
		  },
		  pipesCount: 1,
		  flowing: true,
		  ended: false,
		  endEmitted: false,
		  reading: true,
		  sync: false,
		  needReadable: true,
		  emittedReadable: false,
		  readableListening: false,
		  resumeScheduled: false,
		  destroyed: true,
		  defaultEncoding: 'utf8',
		  awaitDrain: 0,
		  readingMore: false,
		  decoder: null,
		  encoding: null
		},
		readable: true,
		_events: [Object: null prototype] {
		  end: [
			[Function: bound onceWrapper] { listener: [Function: onend] },
			[Function: bound onceWrapper] { listener: [Function: onend] }
		  ],
		  prefinish: [Function (anonymous)],
		  newListener: [Function: removeSink],
		  removeListener: [ [Function: removeSink], [Function: addSink] ],
		  data: [Function: ondata]
		},
		_eventsCount: 5,
		_maxListeners: undefined,
		_writableState: WritableState {
		  objectMode: true,
		  highWaterMark: 16,
		  finalCalled: false,
		  needDrain: false,
		  ending: false,
		  ended: false,
		  finished: false,
		  destroyed: true,
		  decodeStrings: true,
		  defaultEncoding: 'utf8',
		  length: 0,
		  writing: false,
		  corked: 0,
		  sync: false,
		  bufferProcessing: false,
		  onwrite: [Function (anonymous)],
		  writecb: null,
		  writelen: 0,
		  bufferedRequest: null,
		  lastBufferedRequest: null,
		  pendingcb: 0,
		  prefinished: false,
		  errorEmitted: false,
		  bufferedRequestCount: 0,
		  corkedRequestsFree: CorkedRequest {
			next: null,
			entry: null,
			finish: [Function (anonymous)]
		  }
		},
		writable: true,
		allowHalfOpen: true,
		_writable: DestroyableTransform {
		  _readableState: ReadableState {
			objectMode: true,
			highWaterMark: 16,
			buffer: BufferList { head: null, tail: null, length: 0 },
			length: 0,
			pipes: null,
			pipesCount: 0,
			flowing: false,
			ended: false,
			endEmitted: false,
			reading: false,
			sync: false,
			needReadable: true,
			emittedReadable: false,
			readableListening: false,
			resumeScheduled: false,
			destroyed: false,
			defaultEncoding: 'utf8',
			awaitDrain: 0,
			readingMore: false,
			decoder: null,
			encoding: null
		  },
		  readable: true,
		  _events: [Object: null prototype] {
			end: [
			  [Function: bound onceWrapper] { listener: [Function: onend] },
			  [Function: onend],
			  [Function: onend]
			],
			prefinish: [Function: prefinish],
			close: [
			  [Function (anonymous)],
			  [Function: onclose],
			  [Function: onclose]
			],
			finish: [ [Function: onfinish], [Function: onfinish] ],
			error: [ [Function: onerror], [Function: onerror] ],
			drain: [Function: ondrain]
		  },
		  _eventsCount: 6,
		  _maxListeners: undefined,
		  _writableState: WritableState {
			objectMode: true,
			highWaterMark: 16,
			finalCalled: false,
			needDrain: false,
			ending: false,
			ended: false,
			finished: false,
			destroyed: false,
			decodeStrings: true,
			defaultEncoding: 'utf8',
			length: 0,
			writing: false,
			corked: 0,
			sync: false,
			bufferProcessing: false,
			onwrite: [Function (anonymous)],
			writecb: null,
			writelen: 0,
			bufferedRequest: null,
			lastBufferedRequest: null,
			pendingcb: 0,
			prefinished: false,
			errorEmitted: false,
			bufferedRequestCount: 0,
			corkedRequestsFree: CorkedRequest {
			  next: null,
			  entry: null,
			  finish: [Function (anonymous)]
			}
		  },
		  writable: true,
		  allowHalfOpen: true,
		  _transformState: {
			afterTransform: [Function: bound afterTransform],
			needTransform: true,
			transforming: false,
			writecb: null,
			writechunk: null,
			writeencoding: 'utf8'
		  },
		  _destroyed: true,
		  _transform: [Function: normalize],
		  [Symbol(kCapture)]: false
		},
		_readable: DestroyableTransform {
		  _readableState: ReadableState {
			objectMode: true,
			highWaterMark: 16,
			buffer: BufferList { head: null, tail: null, length: 0 },
			length: 0,
			pipes: null,
			pipesCount: 0,
			flowing: null,
			ended: false,
			endEmitted: false,
			reading: true,
			sync: false,
			needReadable: true,
			emittedReadable: false,
			readableListening: true,
			resumeScheduled: false,
			destroyed: false,
			defaultEncoding: 'utf8',
			awaitDrain: 0,
			readingMore: false,
			decoder: null,
			encoding: null
		  },
		  readable: true,
		  _events: [Object: null prototype] {
			end: [
			  [Function: bound onceWrapper] { listener: [Function: onend] },
			  [Function: onend],
			  [Function: onend],
			  [Function: onend]
			],
			prefinish: [Function: prefinish],
			close: [
			  [Function (anonymous)],
			  [Function: onclose],
			  [Function: onclose]
			],
			finish: [ [Function: onfinish], [Function: onfinish] ],
			error: [ [Function: onerror], [Function: onerror] ],
			readable: [Function: onreadable]
		  },
		  _eventsCount: 6,
		  _maxListeners: undefined,
		  _writableState: WritableState {
			objectMode: true,
			highWaterMark: 16,
			finalCalled: false,
			needDrain: false,
			ending: false,
			ended: false,
			finished: false,
			destroyed: false,
			decodeStrings: true,
			defaultEncoding: 'utf8',
			length: 0,
			writing: false,
			corked: 0,
			sync: true,
			bufferProcessing: false,
			onwrite: [Function (anonymous)],
			writecb: null,
			writelen: 0,
			bufferedRequest: null,
			lastBufferedRequest: null,
			pendingcb: 0,
			prefinished: false,
			errorEmitted: false,
			bufferedRequestCount: 0,
			corkedRequestsFree: CorkedRequest {
			  next: null,
			  entry: null,
			  finish: [Function (anonymous)]
			}
		  },
		  writable: true,
		  allowHalfOpen: true,
		  _transformState: {
			afterTransform: [Function: bound afterTransform],
			needTransform: true,
			transforming: false,
			writecb: null,
			writechunk: null,
			writeencoding: null
		  },
		  _destroyed: true,
		  _transform: [Function: writeFile],
		  [Symbol(kCapture)]: false
		},
		_readable2: DestroyableTransform {
		  _readableState: ReadableState {
			objectMode: true,
			highWaterMark: 16,
			buffer: BufferList { head: null, tail: null, length: 0 },
			length: 0,
			pipes: null,
			pipesCount: 0,
			flowing: null,
			ended: false,
			endEmitted: false,
			reading: true,
			sync: false,
			needReadable: true,
			emittedReadable: false,
			readableListening: true,
			resumeScheduled: false,
			destroyed: false,
			defaultEncoding: 'utf8',
			awaitDrain: 0,
			readingMore: false,
			decoder: null,
			encoding: null
		  },
		  readable: true,
		  _events: [Object: null prototype] {
			end: [
			  [Function: bound onceWrapper] { listener: [Function: onend] },
			  [Function: onend],
			  [Function: onend],
			  [Function: onend]
			],
			prefinish: [Function: prefinish],
			close: [
			  [Function (anonymous)],
			  [Function: onclose],
			  [Function: onclose]
			],
			finish: [ [Function: onfinish], [Function: onfinish] ],
			error: [ [Function: onerror], [Function: onerror] ],
			readable: [Function: onreadable]
		  },
		  _eventsCount: 6,
		  _maxListeners: undefined,
		  _writableState: WritableState {
			objectMode: true,
			highWaterMark: 16,
			finalCalled: false,
			needDrain: false,
			ending: false,
			ended: false,
			finished: false,
			destroyed: false,
			decodeStrings: true,
			defaultEncoding: 'utf8',
			length: 0,
			writing: false,
			corked: 0,
			sync: true,
			bufferProcessing: false,
			onwrite: [Function (anonymous)],
			writecb: null,
			writelen: 0,
			bufferedRequest: null,
			lastBufferedRequest: null,
			pendingcb: 0,
			prefinished: false,
			errorEmitted: false,
			bufferedRequestCount: 0,
			corkedRequestsFree: CorkedRequest {
			  next: null,
			  entry: null,
			  finish: [Function (anonymous)]
			}
		  },
		  writable: true,
		  allowHalfOpen: true,
		  _transformState: {
			afterTransform: [Function: bound afterTransform],
			needTransform: true,
			transforming: false,
			writecb: null,
			writechunk: null,
			writeencoding: null
		  },
		  _destroyed: true,
		  _transform: [Function: writeFile],
		  [Symbol(kCapture)]: false
		},
		_autoDestroy: false,
		_forwardDestroy: false,
		_forwardEnd: true,
		_corked: 0,
		_ondrain: null,
		_drained: true,
		_forwarding: false,
		_unwrite: [Function: clear],
		_unread: [Function: clear],
		_ended: false,
		[Symbol(kCapture)]: false
	  },
	  domainThrown: false
	}
	npm ERR! code ELIFECYCLE
	npm ERR! errno 1
	npm ERR! openemr-interface@0.2.0 postinstall: `napa && gulp -i`
	npm ERR! Exit status 1
	npm ERR!
	npm ERR! Failed at the openemr-interface@0.2.0 postinstall script.
	npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

	npm ERR! A complete log of this run can be found in:
	npm ERR!     /home/ubuntu/.npm/_logs/2021-05-12T09_11_46_359Z-debug.log

@brady.miller I am on a brand new install. Ran all the dependencies PHP 7.4 apache 2.4.4 mariadb 10

Looks like npm does not have permission to place the packages in /var/www/html/boss/public/assets . You can confirm this by seeing if that directory is empty after npm install.

try:

npm install --unsafe-perm
1 Like

It is not empty. there is one sub-folder in there name modified.

@brady.miller I had to run sudo npm install for it to work properly and then the program suggested
found 13 vulnerabilities (1 low, 12 moderate)
run npm audit fix to fix them, or npm audit for details

I ran the audit fix and the assets folder is not populated.

The build is now finished. Thanks @brady.miller

1 Like

@juggernautsei , Good to hear. Would stay away from the audit fix stuff or you risk bringing in a newer version of a package that may not work.