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

How do you develop the javascript? #147

Open
mauritsvanrees opened this issue May 3, 2023 · 1 comment
Open

How do you develop the javascript? #147

mauritsvanrees opened this issue May 3, 2023 · 1 comment

Comments

@mauritsvanrees
Copy link
Member

Which node / npm / yarn version should I use? Would be good to have this documented, or configured in the Volta way.

I ran yarn install (version 3.5.0) and got a modified yarn.lock and untracked files .yarn/ and .yarnrc.yml.

@mauritsvanrees
Copy link
Member Author

With yarn version 1 it seems okay, I get no problems, and no changes after running yarn install && yarn build. Node 16 and 18 seem fine. This Volta config in package.json would help then:

  "volta": {
    "node": "18.16.0",
    "yarn": "1.22.19"
   }

I do see that linting fails:

$ yarn lint
yarn run v1.22.19
$ eslint src
Error: Cannot find module 'escope'
Require stack:
- /Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/api.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at monkeypatch (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/babel-eslint/index.js:41:26)
    at exports.parse (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/babel-eslint/index.js:384:5)
    at parse (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:641:29)
    at Linter._verifyWithoutProcessors (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:1111:33)
    at Linter._verifyWithConfigArray (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:1255:21)
    at Linter.verify (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:1210:25)
    at Linter.verifyAndFix (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:1400:29)
    at verifyText (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/cli-engine/cli-engine.js:230:48)
    at CLIEngine.executeOnFiles (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/cli-engine/cli-engine.js:798:28)
error Command failed with exit code 1.

But yarn start works.

And if I do export NODE_ENV=development and then make run in the top directory, then the "Edit taxonomy data" page uses the javascript from the live yarn server, so that works.

Just trying to get my bearings in this package.

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

1 participant