Skip to content

Error: Cannot find module '../parcel-css.linux-x64-gnu.node' #3

@lokimckay

Description

@lokimckay

Issue

When running release github action, npm ci uses package-lock.json versions, which doesn't play nice with a particular package that has OS dependency @parcel/css

Terminal output
npm run be build
  shell: /usr/bin/bash -e {0}
  env:
    GH_TOKEN: ***

> resurface@0.0.1 be
> npm run -w browser-extension -- "build"


> build
> cross-env MODE=prod run-s clean build:**


> clean
> shx rm -rf dist resurface-xtn.zip


> build:manifest
> shx mkdir dist && esr ci/manifest.js


> build:assets
> shx cp -r src/assets dist


> build:esbuild
> node ci/esbuild.js

node:internal/modules/cjs/loader:9[3](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:3)6
  throw err;
  ^

Error: Cannot find module '../parcel-css.linux-x6[4](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:4)-gnu.node'
Require stack:
- /home/runner/work/resurface/resurface/node_modules/@parcel/css/node/index.js
- /home/runner/work/resurface/resurface/node_modules/esbuild-css-modules-plugin/lib/plugin.js
- /home/runner/work/resurface/resurface/node_modules/esbuild-css-modules-plugin/index.js
- /home/runner/work/resurface/resurface/browser-extension/ci/esbuild.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:1[5](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:5))
    at Function.Module._load (node:internal/modules/cjs/loader:[7](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:7)7[8](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:8):27)
    at Module.require (node:internal/modules/cjs/loader:1005:1[9](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:9))
    at require (node:internal/modules/cjs/helpers:[10](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:10)2:18)
    at Object.<anonymous> (/home/runner/work/resurface/resurface/node_modules/@parcel/css/node/index.js:21:22)
    at Module._compile (node:internal/modules/cjs/loader:[11](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:11)05:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:[12](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:12))
    at Module.require (node:internal/modules/cjs/loader:1005:[19](https://github.com/code-cabana/resurface/runs/6439059179?check_suite_focus=true#step:6:19)) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/resurface/resurface/node_modules/@parcel/css/node/index.js',
    '/home/runner/work/resurface/resurface/node_modules/esbuild-css-modules-plugin/lib/plugin.js',
    '/home/runner/work/resurface/resurface/node_modules/esbuild-css-modules-plugin/index.js',
    '/home/runner/work/resurface/resurface/browser-extension/ci/esbuild.js'
  ]
}
npm ERR! Lifecycle script `build:esbuild` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: browser-extension 
npm ERR!   at location: /home/runner/work/resurface/resurface/browser-extension 
ERROR: "build:esbuild" exited with 1.
npm ERR! Lifecycle script `build` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: browser-extension 
npm ERR!   at location: /home/runner/work/resurface/resurface/browser-extension 
Error: Process completed with exit code 1.

Workaround

parcel-bundler/parcel#7962 (comment)

@parcel/css must be included as a dev dependency

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions